|
@@ -73,6 +73,9 @@
|
73
|
73
|
" python_highlight_doctests Highlight doc-tests
|
74
|
74
|
" python_print_as_function Highlight 'print' statement as
|
75
|
75
|
" function for Python 2
|
|
76
|
+" python_highlight_file_headers_as_comments
|
|
77
|
+" Highlight shebang and coding
|
|
78
|
+" headers as comments
|
76
|
79
|
"
|
77
|
80
|
" python_highlight_all Enable all the options above
|
78
|
81
|
" NOTE: This option don't override
|
|
@@ -179,8 +182,10 @@ syn match pythonDot "\." display containedin=pythonDottedName
|
179
|
182
|
"
|
180
|
183
|
|
181
|
184
|
syn match pythonComment "#.*$" display contains=pythonTodo,@Spell
|
182
|
|
-syn match pythonRun "\%^#!.*$"
|
183
|
|
-syn match pythonCoding "\%^.*\%(\n.*\)\?#.*coding[:=]\s*[0-9A-Za-z-_.]\+.*$"
|
|
185
|
+if !s:Enabled("g:python_highlight_file_headers_as_comments")
|
|
186
|
+ syn match pythonRun "\%^#!.*$"
|
|
187
|
+ syn match pythonCoding "\%^.*\%(\n.*\)\?#.*coding[:=]\s*[0-9A-Za-z-_.]\+.*$"
|
|
188
|
+endif
|
184
|
189
|
syn keyword pythonTodo TODO FIXME XXX contained
|
185
|
190
|
|
186
|
191
|
"
|
|
@@ -482,8 +487,10 @@ if version >= 508 || !exists("did_python_syn_inits")
|
482
|
487
|
HiLink pythonDot Normal
|
483
|
488
|
|
484
|
489
|
HiLink pythonComment Comment
|
485
|
|
- HiLink pythonCoding Special
|
486
|
|
- HiLink pythonRun Special
|
|
490
|
+ if !s:Enabled("g:python_highlight_file_headers_as_comments")
|
|
491
|
+ HiLink pythonCoding Special
|
|
492
|
+ HiLink pythonRun Special
|
|
493
|
+ endif
|
487
|
494
|
HiLink pythonTodo Todo
|
488
|
495
|
|
489
|
496
|
HiLink pythonError Error
|