Browse Source

Merge remote-tracking branch 'lilydjwg/master'

Joongi Kim 7 years ago
parent
commit
67c13cffa5
1 changed files with 5 additions and 6 deletions
  1. 5
    6
      syntax/python.vim

+ 5
- 6
syntax/python.vim View File

176
   syn keyword pythonImport      as
176
   syn keyword pythonImport      as
177
   syn match   pythonFunction    "[a-zA-Z_][a-zA-Z0-9_]*" display contained
177
   syn match   pythonFunction    "[a-zA-Z_][a-zA-Z0-9_]*" display contained
178
 else
178
 else
179
-  syn keyword pythonStatement   as nonlocal None
179
+  syn keyword pythonStatement   as nonlocal
180
   syn match   pythonStatement   "\<yield\s\+from\>" display
180
   syn match   pythonStatement   "\<yield\s\+from\>" display
181
-  syn keyword pythonBoolean     True False
181
+  syn keyword pythonBuiltinObj  None True False
182
   syn match   pythonFunction    "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained
182
   syn match   pythonFunction    "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained
183
-  syn keyword pythonStatement   await
183
+  syn keyword pythonStatement   await async
184
   syn match   pythonStatement   "\<async\s\+def\>" nextgroup=pythonFunction skipwhite
184
   syn match   pythonStatement   "\<async\s\+def\>" nextgroup=pythonFunction skipwhite
185
   syn match   pythonStatement   "\<async\s\+with\>" display
185
   syn match   pythonStatement   "\<async\s\+with\>" display
186
   syn match   pythonStatement   "\<async\s\+for\>" display
186
   syn match   pythonStatement   "\<async\s\+for\>" display
192
 " Decorators (new in Python 2.4)
192
 " Decorators (new in Python 2.4)
193
 "
193
 "
194
 
194
 
195
-syn match   pythonDecorator	"@" display nextgroup=pythonDottedName skipwhite
195
+syn match   pythonDecorator	"^\s*\zs@" display nextgroup=pythonDottedName skipwhite
196
 if s:Python2Syntax()
196
 if s:Python2Syntax()
197
   syn match   pythonDottedName "[a-zA-Z_][a-zA-Z0-9_]*\%(\.[a-zA-Z_][a-zA-Z0-9_]*\)*" display contained
197
   syn match   pythonDottedName "[a-zA-Z_][a-zA-Z0-9_]*\%(\.[a-zA-Z_][a-zA-Z0-9_]*\)*" display contained
198
 else
198
 else
413
 
413
 
414
 if s:Enabled("g:python_highlight_builtin_objs")
414
 if s:Enabled("g:python_highlight_builtin_objs")
415
   if s:Python2Syntax()
415
   if s:Python2Syntax()
416
-    syn keyword pythonBuiltinObj	None
417
-    syn keyword pythonBoolean		True False
416
+    syn keyword pythonBuiltinObj	None False True
418
   endif
417
   endif
419
   syn keyword pythonBuiltinObj	Ellipsis NotImplemented
418
   syn keyword pythonBuiltinObj	Ellipsis NotImplemented
420
   syn keyword pythonBuiltinObj	__debug__ __doc__ __file__ __name__ __package__
419
   syn keyword pythonBuiltinObj	__debug__ __doc__ __file__ __name__ __package__