Browse Source

Add pythonConvention HL class (`cls` and `self`)

These are especially useful in OOP as they help visually distinguish how
many parameters the function will be called with (in signature), or
actual state preservation from transient or return variables (in
function body).
Alois Mahdal 9 years ago
parent
commit
fc28c3c3d8
1 changed files with 6 additions and 0 deletions
  1. 6
    0
      syntax/python.vim

+ 6
- 0
syntax/python.vim View File

477
   syn keyword pythonExClass	ImportWarning UnicodeWarning
477
   syn keyword pythonExClass	ImportWarning UnicodeWarning
478
 endif
478
 endif
479
 
479
 
480
+syn keyword pythonConvention    self
481
+syn keyword pythonConvention    cls
482
+
483
+
480
 if s:Enabled("g:python_slow_sync")
484
 if s:Enabled("g:python_slow_sync")
481
   syn sync minlines=2000
485
   syn sync minlines=2000
482
 else
486
 else
562
 
566
 
563
   HiLink pythonExClass          Structure
567
   HiLink pythonExClass          Structure
564
 
568
 
569
+  HiLink pythonConvention       Define
570
+
565
   delcommand HiLink
571
   delcommand HiLink
566
 endif
572
 endif
567
 
573