浏览代码

Merge "Mark None as Python builtin object along with True and False"

https://github.com/hdima/python-syntax/pull/53
lilydjwg 8 年前
父节点
当前提交
9bd9cbca8b
共有 1 个文件被更改,包括 3 次插入4 次删除
  1. 3
    4
      syntax/python.vim

+ 3
- 4
syntax/python.vim 查看文件

@@ -176,9 +176,9 @@ if s:Python2Syntax()
176 176
   syn keyword pythonImport      as
177 177
   syn match   pythonFunction    "[a-zA-Z_][a-zA-Z0-9_]*" display contained
178 178
 else
179
-  syn keyword pythonStatement   as nonlocal None
179
+  syn keyword pythonStatement   as nonlocal
180 180
   syn match   pythonStatement   "\<yield\s\+from\>" display
181
-  syn keyword pythonBoolean     True False
181
+  syn keyword pythonBuiltinObj  None True False
182 182
   syn match   pythonFunction    "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained
183 183
   syn keyword pythonStatement   await
184 184
   syn match   pythonStatement   "\<async\s\+def\>" nextgroup=pythonFunction skipwhite
@@ -413,8 +413,7 @@ endif
413 413
 
414 414
 if s:Enabled("g:python_highlight_builtin_objs")
415 415
   if s:Python2Syntax()
416
-    syn keyword pythonBuiltinObj	None
417
-    syn keyword pythonBoolean		True False
416
+    syn keyword pythonBuiltinObj	None False True
418 417
   endif
419 418
   syn keyword pythonBuiltinObj	Ellipsis NotImplemented
420 419
   syn keyword pythonBuiltinObj	__debug__ __doc__ __file__ __name__ __package__