Skip to content

Commit 60a7b5c

Browse files
Alois MahdalAlois Mahdal
authored andcommitted
Mark None as Python builtin object along with True and False
More specifically, they are "built-in constants": https://docs.python.org/2/library/constants.html#built-in-consts
1 parent 69760cb commit 60a7b5c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

syntax/python.vim

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,9 @@ if s:Python2Syntax()
176176
syn keyword pythonImport as
177177
syn match pythonFunction "[a-zA-Z_][a-zA-Z0-9_]*" display contained
178178
else
179-
syn keyword pythonStatement as nonlocal None
179+
syn keyword pythonStatement as nonlocal
180180
syn match pythonStatement "\<yield\s\+from\>" display
181-
syn keyword pythonBoolean True False
181+
syn keyword pythonBuiltinObj None True False
182182
syn match pythonFunction "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained
183183
syn keyword pythonStatement await
184184
syn match pythonStatement "\<async\s\+def\>" nextgroup=pythonFunction skipwhite
@@ -399,8 +399,7 @@ syn match pythonFloat "\<\d\+\.\d*\%([eE][+-]\=\d\+\)\=[jJ]\=" display
399399

400400
if s:Enabled("g:python_highlight_builtin_objs")
401401
if s:Python2Syntax()
402-
syn keyword pythonBuiltinObj None
403-
syn keyword pythonBoolean True False
402+
syn keyword pythonBuiltinObj None False True
404403
endif
405404
syn keyword pythonBuiltinObj Ellipsis NotImplemented
406405
syn keyword pythonBuiltinObj __debug__ __doc__ __file__ __name__ __package__

0 commit comments

Comments
 (0)