Created
August 4, 2015 18:07
Revisions
-
magnunleno created this gist
Aug 4, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ " Match (only 'bar') in function calls like: 'foo.bar()' or 'bar()' syn match pythonFunction /\(^\s*\(def\|class\)\s*\w*\)\@<!\w\{1,}\ze(/ " Match dunder methods/attributes syn match pythonBuiltin "__\w*__" " Match under methods/attributes syn match pythonIdentifier "_\w*_" " Match self (not in function declarations) syn match pythonFunction /\(^\s*def \s*\w*\s*(\)\@<!self/ " Match self in function declarations syn match pythonIgnore /\(^\s*def \s*\w*\s*(\)\@<=self\ze\s*[,)]/ " Pseudo-consants in python (Capital letters variables) syn match pythonConstant /\<[A-Z_][A-Z_0-9]*\>/ hi link pythonIgnore Ignore hi link pythonIdentifier Identifier hi link pythonConstant Constant