Browse Source

Add highlight of classes

This gives a highlight to variables that are UpperCamelCase, e.g. Python
classes.
Lowe Thiderman 9 years ago
parent
commit
3ca684c75d
1 changed files with 7 additions and 0 deletions
  1. 7
    0
      syntax/python.vim

+ 7
- 0
syntax/python.vim View File

@@ -193,6 +193,12 @@ if !s:Enabled("g:python_highlight_file_headers_as_comments")
193 193
 endif
194 194
 syn keyword pythonTodo		TODO FIXME XXX contained
195 195
 
196
+"
197
+" Classes
198
+"
199
+
200
+syn match pythonClass       "\(import \)\@<!\<[A-Z][a-zA-Z]*" display
201
+
196 202
 "
197 203
 " Errors
198 204
 "
@@ -486,6 +492,7 @@ if version >= 508 || !exists("did_python_syn_inits")
486 492
   HiLink pythonRepeat           Repeat
487 493
   HiLink pythonException        Exception
488 494
   HiLink pythonOperator         Operator
495
+  HiLink pythonClass            Type
489 496
 
490 497
   HiLink pythonDecorator        Define
491 498
   HiLink pythonDottedName       Function