Skip to content

Instantly share code, notes, and snippets.

@hanspinckaers
Created August 20, 2018 18:36
Show Gist options
  • Save hanspinckaers/fb373fe24d1c536a240036ed735ec377 to your computer and use it in GitHub Desktop.
Save hanspinckaers/fb373fe24d1c536a240036ed735ec377 to your computer and use it in GitHub Desktop.
Extra .vimrc highlight settings
" highlight attribute access: hello.highlighted
autocmd BufEnter * syntax match Type /\v\.[a-zA-Z0-9_]+\ze(\[|\s|$|,|\]|\)|\.|:)/hs=s+1
" highlight function calls: hello.highlighted()
autocmd BufEnter * syntax match pythonFunction /\v[[:alnum:]_]+\ze(\s?\()/
hi def link pythonFunction Function
" Highlight self slightly darker
autocmd BufEnter * syn match Self "\(\W\|^\)\@<=self\(\.\)\@="
highlight self ctermfg=239
" Extra Impsort highlights:
hi pythonImportedObject ctermfg=127
hi pythonImportedFuncDef ctermfg=127
hi pythonImportedClassDef ctermfg=127
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment