I saw that it's possible to manually add types to highlight, according to this post: https://stackoverflow.com/questions/20149478/how-can-i-teach-vim-about-additional-c-language-types-for-syntax-highlighting
However I was wondering if it's possible for vim to automatically highlight typedefs?
typedef foo int
to now highlight allfoo
s as types? If you just use regex, it's likely to be buggy (foo foo
is valid, and declares a variablefoo
of typeint
). You'd need a fully syntax parser that could then tell vim what to do.YouCompletMe
plugin can do this, since its a supposed to be a code comprehension plugin.