Skip to content

Commit fc28c3c

Browse files
author
Alois Mahdal
committed
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).
1 parent 69760cb commit fc28c3c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

syntax/python.vim

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,10 @@ if s:Enabled("g:python_highlight_exceptions")
477477
syn keyword pythonExClass ImportWarning UnicodeWarning
478478
endif
479479

480+
syn keyword pythonConvention self
481+
syn keyword pythonConvention cls
482+
483+
480484
if s:Enabled("g:python_slow_sync")
481485
syn sync minlines=2000
482486
else
@@ -562,6 +566,8 @@ if version >= 508 || !exists("did_python_syn_inits")
562566

563567
HiLink pythonExClass Structure
564568

569+
HiLink pythonConvention Define
570+
565571
delcommand HiLink
566572
endif
567573

0 commit comments

Comments
 (0)