diff --git a/CHANGES.txt b/CHANGES.txt index ca6ab78..e0579bf 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,8 @@ +Revision 3.3.6 (2013-11-18): + + - Highlight 'yield from' statement introduced in Python 3.3. Reported by + Elizabeth Myers. + Revision 3.3.5 (2013-08-31): - Highlight 'import', 'from' and 'as' as include statements. diff --git a/README.rst b/README.rst index f7d20f4..8293b60 100644 --- a/README.rst +++ b/README.rst @@ -133,6 +133,7 @@ List of the contributors in alphabetical order: - Andrea Riciputi - Anton Butanaev - Caleb Adamantine +- Elizabeth Myers - Jeroen Ruigrok van der Werven - John Eikenberry - Marc Weber diff --git a/syntax/python.vim b/syntax/python.vim index e2eaa90..8e25a7f 100644 --- a/syntax/python.vim +++ b/syntax/python.vim @@ -2,9 +2,9 @@ " Language: Python " Maintainer: Dmitry Vasiliev " URL: https://github.com/hdima/python-syntax -" Last Change: 2013-08-31 +" Last Change: 2013-11-18 " Filenames: *.py -" Version: 3.3.5 +" Version: 3.3.6 " " Based on python.vim (from Vim 6.1 distribution) " by Neil Schemenauer @@ -25,6 +25,7 @@ " Andrea Riciputi " Anton Butanaev " Caleb Adamantine +" Elizabeth Myers " Jeroen Ruigrok van der Werven " John Eikenberry " Marc Weber @@ -148,15 +149,18 @@ syn keyword pythonStatement break continue del syn keyword pythonStatement exec return syn keyword pythonStatement pass raise syn keyword pythonStatement global assert -syn keyword pythonStatement lambda yield +syn keyword pythonStatement lambda syn keyword pythonStatement with syn keyword pythonStatement def class nextgroup=pythonFunction skipwhite syn keyword pythonRepeat for while syn keyword pythonConditional if elif else -syn keyword pythonImport import from +syn keyword pythonImport import syn keyword pythonException try except finally syn keyword pythonOperator and in is not or +syn match pythonStatement "\" display +syn match pythonImport "\" display + if s:Python2Syntax() if !s:Enabled("g:python_print_as_function") syn keyword pythonStatement print @@ -165,6 +169,7 @@ if s:Python2Syntax() syn match pythonFunction "[a-zA-Z_][a-zA-Z0-9_]*" display contained else syn keyword pythonStatement as nonlocal None + syn match pythonStatement "\" display syn keyword pythonBoolean True False syn match pythonFunction "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained endif diff --git a/test.py b/test.py index af17c27..0ee30a2 100644 --- a/test.py +++ b/test.py @@ -10,6 +10,9 @@ with break continue del exec return pass print raise global assert lambda yield for while if elif else import from as try except finally and in is not or + +yield from + def functionname class Classname def функция