mirror of
https://github.com/vim-python/python-syntax.git
synced 2025-12-08 21:54:48 +08:00
Highlight non-ASCII decorators only for Python 3
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
Revision 3.3.7 (2014-12-27):
|
||||||
|
|
||||||
|
- Add support for Python 3 non-ASCII decorator names.
|
||||||
|
Patch by Victor Salgado
|
||||||
|
|
||||||
Revision 3.3.6 (2013-11-18):
|
Revision 3.3.6 (2013-11-18):
|
||||||
|
|
||||||
- Highlight 'yield from' statement introduced in Python 3.3. Reported by
|
- Highlight 'yield from' statement introduced in Python 3.3. Reported by
|
||||||
|
|||||||
@@ -139,5 +139,6 @@ List of the contributors in alphabetical order:
|
|||||||
- Marc Weber
|
- Marc Weber
|
||||||
- Pedro Algarvio
|
- Pedro Algarvio
|
||||||
- pydave at GitHub
|
- pydave at GitHub
|
||||||
|
- Victor Salgado
|
||||||
- Will Gray
|
- Will Gray
|
||||||
- Yuri Habrusiev
|
- Yuri Habrusiev
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
" Language: Python
|
" Language: Python
|
||||||
" Maintainer: Dmitry Vasiliev <dima at hlabs dot org>
|
" Maintainer: Dmitry Vasiliev <dima at hlabs dot org>
|
||||||
" URL: https://github.com/hdima/python-syntax
|
" URL: https://github.com/hdima/python-syntax
|
||||||
" Last Change: 2013-11-18
|
" Last Change: 2014-12-27
|
||||||
" Filenames: *.py
|
" Filenames: *.py
|
||||||
" Version: 3.3.6
|
" Version: 3.3.7
|
||||||
"
|
"
|
||||||
" Based on python.vim (from Vim 6.1 distribution)
|
" Based on python.vim (from Vim 6.1 distribution)
|
||||||
" by Neil Schemenauer <nas at python dot ca>
|
" by Neil Schemenauer <nas at python dot ca>
|
||||||
@@ -31,6 +31,7 @@
|
|||||||
" Marc Weber
|
" Marc Weber
|
||||||
" Pedro Algarvio
|
" Pedro Algarvio
|
||||||
" pydave at GitHub
|
" pydave at GitHub
|
||||||
|
" Victor Salgado
|
||||||
" Will Gray
|
" Will Gray
|
||||||
" Yuri Habrusiev
|
" Yuri Habrusiev
|
||||||
"
|
"
|
||||||
@@ -179,7 +180,11 @@ endif
|
|||||||
"
|
"
|
||||||
|
|
||||||
syn match pythonDecorator "@" display nextgroup=pythonDottedName skipwhite
|
syn match pythonDecorator "@" display nextgroup=pythonDottedName skipwhite
|
||||||
syn match pythonDottedName "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*\%(\.\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*\)*" display contained
|
if s:Python2Syntax()
|
||||||
|
syn match pythonDottedName "[a-zA-Z_][a-zA-Z0-9_]*\%(\.[a-zA-Z_][a-zA-Z0-9_]*\)*" display contained
|
||||||
|
else
|
||||||
|
syn match pythonDottedName "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*\%(\.\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*\)*" display contained
|
||||||
|
endif
|
||||||
syn match pythonDot "\." display containedin=pythonDottedName
|
syn match pythonDot "\." display containedin=pythonDottedName
|
||||||
|
|
||||||
"
|
"
|
||||||
|
|||||||
Reference in New Issue
Block a user