Skip to content

Instantly share code, notes, and snippets.

@mirekfranc
Last active July 28, 2016 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mirekfranc/490fb44eae2d6e4a57021235423ac7ef to your computer and use it in GitHub Desktop.
Save mirekfranc/490fb44eae2d6e4a57021235423ac7ef to your computer and use it in GitHub Desktop.
mkdir -p ~/.vim/syntax; cp ./cpp.vim ~/.vim/syntax/cpp.vim && ln -s ~/.vim/syntax/cpp.vim ~/.vim/syntax/c.vim
syntax match BeforeSpace /^ */ containedin=ALL
syntax match AfterSpace / *$/ containedin=ALL
syntax match InsideSpace "\t *\t"hs=s+1,he=e-1 containedin=ALL
highlight BeforeSpace ctermbg=DarkBlue
highlight AfterSpace ctermbg=DarkBlue
highlight InsideSpace ctermbg=DarkBlue
@mirekfranc
Copy link
Author

And I guess it helps to have a `syntax on' in ~/.vimrc

@mirekfranc
Copy link
Author

ln -s ~/.vim/syntax/cpp.vim ~/.vim/syntax/make.vim
ln -s ~/.vim/syntax/cpp.vim ~/.vim/syntax/python.vim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment