Skip to content

Commit 6f6f10f

Browse files
committed
Clean up boolean highlighting
1 parent a0d21ac commit 6f6f10f

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

CHANGES.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
Revision 3.3.4 (2013-08-11):
2+
3+
- Highlight True and False as booleans. Patch by Yuri Habrusiev.
4+
15
Revision 3.3.3 (2013-06-02):
26

37
- More lightweight syntax reloading. Patch by Will Gray.

README.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,3 +136,4 @@ List of the contributors in alphabetical order:
136136
- Marc Weber
137137
- Pedro Algarvio
138138
- Will Gray
139+
- Yuri Habrusiev

syntax/python.vim

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
" Language: Python
33
" Maintainer: Dmitry Vasiliev <dima at hlabs dot org>
44
" URL: https://github.com/hdima/python-syntax
5-
" Last Change: 2013-06-02
5+
" Last Change: 2013-08-11
66
" Filenames: *.py
7-
" Version: 3.3.3
7+
" Version: 3.3.4
88
"
99
" Based on python.vim (from Vim 6.1 distribution)
1010
" by Neil Schemenauer <nas at python dot ca>
@@ -30,6 +30,7 @@
3030
" Marc Weber
3131
" Pedro Algarvio
3232
" Will Gray
33+
" Yuri Habrusiev
3334
"
3435
" Options
3536
" =======
@@ -159,8 +160,8 @@ if s:Python2Syntax()
159160
syn keyword pythonPreCondit as
160161
syn match pythonFunction "[a-zA-Z_][a-zA-Z0-9_]*" display contained
161162
else
162-
syn keyword pythonStatement as nonlocal
163-
syn keyword pythonBoolean True False None
163+
syn keyword pythonStatement as nonlocal None
164+
syn keyword pythonBoolean True False
164165
syn match pythonFunction "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained
165166
endif
166167

@@ -371,7 +372,8 @@ syn match pythonFloat "\<\d\+\.\d*\%([eE][+-]\=\d\+\)\=[jJ]\=" display
371372

372373
if s:Enabled("g:python_highlight_builtin_objs")
373374
if s:Python2Syntax()
374-
syn keyword pythonBuiltinObj True False None
375+
syn keyword pythonBuiltinObj None
376+
syn keyword pythonBoolean True False
375377
endif
376378
syn keyword pythonBuiltinObj Ellipsis NotImplemented
377379
syn keyword pythonBuiltinObj __debug__ __doc__ __file__ __name__ __package__

0 commit comments

Comments
 (0)