From 6f6f10ff5408182f1d8ff1af26058e80c5dfa9cd Mon Sep 17 00:00:00 2001 From: Dmitry Vasiliev Date: Sun, 11 Aug 2013 17:25:39 +0200 Subject: [PATCH] Clean up boolean highlighting --- CHANGES.txt | 4 ++++ README.rst | 1 + syntax/python.vim | 12 +++++++----- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 776ef86..05e7a20 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,7 @@ +Revision 3.3.4 (2013-08-11): + + - Highlight True and False as booleans. Patch by Yuri Habrusiev. + Revision 3.3.3 (2013-06-02): - More lightweight syntax reloading. Patch by Will Gray. diff --git a/README.rst b/README.rst index c49b7d3..9c012cd 100644 --- a/README.rst +++ b/README.rst @@ -136,3 +136,4 @@ List of the contributors in alphabetical order: - Marc Weber - Pedro Algarvio - Will Gray +- Yuri Habrusiev diff --git a/syntax/python.vim b/syntax/python.vim index 2f4b493..f317df0 100644 --- a/syntax/python.vim +++ b/syntax/python.vim @@ -2,9 +2,9 @@ " Language: Python " Maintainer: Dmitry Vasiliev " URL: https://github.com/hdima/python-syntax -" Last Change: 2013-06-02 +" Last Change: 2013-08-11 " Filenames: *.py -" Version: 3.3.3 +" Version: 3.3.4 " " Based on python.vim (from Vim 6.1 distribution) " by Neil Schemenauer @@ -30,6 +30,7 @@ " Marc Weber " Pedro Algarvio " Will Gray +" Yuri Habrusiev " " Options " ======= @@ -159,8 +160,8 @@ if s:Python2Syntax() syn keyword pythonPreCondit as syn match pythonFunction "[a-zA-Z_][a-zA-Z0-9_]*" display contained else - syn keyword pythonStatement as nonlocal - syn keyword pythonBoolean True False None + syn keyword pythonStatement as nonlocal None + syn keyword pythonBoolean True False syn match pythonFunction "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained endif @@ -371,7 +372,8 @@ syn match pythonFloat "\<\d\+\.\d*\%([eE][+-]\=\d\+\)\=[jJ]\=" display if s:Enabled("g:python_highlight_builtin_objs") if s:Python2Syntax() - syn keyword pythonBuiltinObj True False None + syn keyword pythonBuiltinObj None + syn keyword pythonBoolean True False endif syn keyword pythonBuiltinObj Ellipsis NotImplemented syn keyword pythonBuiltinObj __debug__ __doc__ __file__ __name__ __package__