From fc28c3c3d83b8df514995d68b1955c63479d9da3 Mon Sep 17 00:00:00 2001 From: Alois Mahdal Date: Fri, 8 Aug 2014 19:41:48 +0200 Subject: [PATCH] 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). --- syntax/python.vim | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/syntax/python.vim b/syntax/python.vim index e963628..7afc7c0 100644 --- a/syntax/python.vim +++ b/syntax/python.vim @@ -477,6 +477,10 @@ if s:Enabled("g:python_highlight_exceptions") syn keyword pythonExClass ImportWarning UnicodeWarning endif +syn keyword pythonConvention self +syn keyword pythonConvention cls + + if s:Enabled("g:python_slow_sync") syn sync minlines=2000 else @@ -562,6 +566,8 @@ if version >= 508 || !exists("did_python_syn_inits") HiLink pythonExClass Structure + HiLink pythonConvention Define + delcommand HiLink endif