tags:

views:

33

answers:

2

All datatypes like int,long,char are highlighted automatically as soon as i type them in VIM. But, there are few exceptions like pid_t,mode_t..

How do get them highlighted by default?

+1  A: 

There's a directory /usr/share/vim/vim72/ where you can edit files like c.vim and add the keywords manually.

tur1ng
Editing the distributed files is a bad idea as they'll be overwritten every time you upgrade. There's a reason a user-specific directory is included in the `runtimepath` option.
jamessan
i had to append this line by pid_t... :- syn keyword cType int long short char void pid_t
shadyabhi
@jamessanso how do i actually do that.
shadyabhi
+2  A: 

You can add them to syntax/c.vim in your after directory, so they complement the distributed syntax/c.vim. For example:

syn keyword cType pid_t mode_t

See also the "Adding to an Existing Syntax File" section of the user manual.

jamessan