mirror of
https://github.com/vim-python/python-syntax.git
synced 2025-12-08 21:54:48 +08:00
Highlight 'yield from' statement
The 'yield from' statement was introduced in Python 3.3. Reported by Elizabeth Myers.
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
" Language: Python
|
||||
" Maintainer: Dmitry Vasiliev <dima at hlabs dot org>
|
||||
" 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 <nas at python dot ca>
|
||||
@@ -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 "\<yield\>" display
|
||||
syn match pythonImport "\<from\>" 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 "\<yield\s\+from\>" display
|
||||
syn keyword pythonBoolean True False
|
||||
syn match pythonFunction "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user