Advertisement
alaestor

[VIM] vimfiles/syntax/ cpp.vim and h.vim

Oct 7th, 2017
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VIM 0.65 KB | None | 0 0
  1. "Alaestor (FGL 2017)
  2. "credit to stackoverflow's Janosimas and Ragnar
  3. syn match fgl_cppParen "?=(" contains=cParen,cCppParen
  4. syn match fgl_cppFunction "\w\+\s*(\@=" contains=fgl_cppParen
  5. syn match fgl_cppScope "::"
  6. syn match fgl_cppNamespace "\w\+\s*::" contains=fgl_cppScope
  7.  
  8. hi def link fgl_cppFunction Function
  9. hi def link fgl_cppScope Operator
  10. hi def link fgl_cppNamespace StorageClass
  11.  
  12. "credit to stackoverflow's DrAl (added <= >=)
  13. syn match fgl_cppOperators display '[-&|+<>=*/!~]\@<!\%(\([-&|+<>=]\)\1\?\|->\|<=\|>=\|[-+*/%&^|!]=\|[*?,!~%]\|\([<>]\)\2=\)[-&|+<>=*/!~]\@!'
  14. syn match fgl_cppOperators display ';'
  15. hi link fgl_cppOperators Operator
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement