Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow None to be highlighted differently #57

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions syntax/python.vim
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,8 @@ if s:Python2Syntax()
syn keyword pythonImport as
syn match pythonFunction "[a-zA-Z_][a-zA-Z0-9_]*" display contained
else
syn keyword pythonStatement as nonlocal None
syn keyword pythonStatement as nonlocal
syn keyword pythonNone 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
Expand Down Expand Up @@ -399,7 +400,7 @@ syn match pythonFloat "\<\d\+\.\d*\%([eE][+-]\=\d\+\)\=[jJ]\=" display

if s:Enabled("g:python_highlight_builtin_objs")
if s:Python2Syntax()
syn keyword pythonBuiltinObj None
syn keyword pythonNone None
syn keyword pythonBoolean True False
endif
syn keyword pythonBuiltinObj Ellipsis NotImplemented
Expand Down Expand Up @@ -529,13 +530,15 @@ if version >= 508 || !exists("did_python_syn_inits")
HiLink pythonUniRawString String
HiLink pythonUniRawEscape Special
HiLink pythonUniRawEscapeError Error
HiLink pythonNone pythonBuiltinObj
else
HiLink pythonBytes String
HiLink pythonRawBytes String
HiLink pythonBytesContent String
HiLink pythonBytesError Error
HiLink pythonBytesEscape Special
HiLink pythonBytesEscapeError Error
HiLink pythonNone pythonStatement
endif

HiLink pythonStrFormatting Special
Expand Down