Bläddra i källkod

Clean up boolean highlighting

Dmitry Vasiliev 11 år sedan
förälder
incheckning
6f6f10ff54
3 ändrade filer med 12 tillägg och 5 borttagningar
  1. 4
    0
      CHANGES.txt
  2. 1
    0
      README.rst
  3. 7
    5
      syntax/python.vim

+ 4
- 0
CHANGES.txt Visa fil

@@ -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
+
1 5
 Revision 3.3.3 (2013-06-02):
2 6
 
3 7
    - More lightweight syntax reloading. Patch by Will Gray.

+ 1
- 0
README.rst Visa fil

@@ -136,3 +136,4 @@ List of the contributors in alphabetical order:
136 136
 - Marc Weber
137 137
 - Pedro Algarvio
138 138
 - Will Gray
139
+- Yuri Habrusiev

+ 7
- 5
syntax/python.vim Visa fil

@@ -2,9 +2,9 @@
2 2
 " Language:     Python
3 3
 " Maintainer:   Dmitry Vasiliev <dima at hlabs dot org>
4 4
 " URL:          https://github.com/hdima/python-syntax
5
-" Last Change:  2013-06-02
5
+" Last Change:  2013-08-11
6 6
 " Filenames:    *.py
7
-" Version:      3.3.3
7
+" Version:      3.3.4
8 8
 "
9 9
 " Based on python.vim (from Vim 6.1 distribution)
10 10
 " by Neil Schemenauer <nas at python dot ca>
@@ -30,6 +30,7 @@
30 30
 "   Marc Weber
31 31
 "   Pedro Algarvio
32 32
 "   Will Gray
33
+"   Yuri Habrusiev
33 34
 "
34 35
 " Options
35 36
 " =======
@@ -159,8 +160,8 @@ if s:Python2Syntax()
159 160
   syn keyword pythonPreCondit   as
160 161
   syn match   pythonFunction    "[a-zA-Z_][a-zA-Z0-9_]*" display contained
161 162
 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
164 165
   syn match   pythonFunction    "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained
165 166
 endif
166 167
 
@@ -371,7 +372,8 @@ syn match   pythonFloat		"\<\d\+\.\d*\%([eE][+-]\=\d\+\)\=[jJ]\=" display
371 372
 
372 373
 if s:Enabled("g:python_highlight_builtin_objs")
373 374
   if s:Python2Syntax()
374
-    syn keyword pythonBuiltinObj	True False None
375
+    syn keyword pythonBuiltinObj	None
376
+    syn keyword pythonBoolean		True False
375 377
   endif
376 378
   syn keyword pythonBuiltinObj	Ellipsis NotImplemented
377 379
   syn keyword pythonBuiltinObj	__debug__ __doc__ __file__ __name__ __package__