you can enable syntax highlighting in vim by typing:

:syntax on

and disable by:

:syntax off

per default vim shows *.conf files as blue-text on black-bg, which is pretty hard to read.

you can change the color-scheme used by typing:

[cc lang=”bash” escaped=”true” width=”600″]
:colo # no this is not a typo… it really is colo, not color
[/cc]

i like desert 😉

vim color scheme desert

no need to modify any highlighting config files 😉

to

make this changes permanent

for the current user add this line to your .vimrc config file:

[cc lang=”bash” escaped=”true” width=”600″]
echo “syntax on” >> ~/.vimrc; # activate syntax highlighting permanently
echo “colo desert” >> ~/.vimrc;
[/cc]


just for additional info:

[cc lang=”bash” escaped=”true” width=”600″]

locate syntax|grep conf; # find vim syntax highlighting config files for conf files

/usr/share/vim/vim73/syntax/alsaconf.vim
/usr/share/vim/vim73/syntax/cdrdaoconf.vim

/usr/share/vim/vim73/syntax/conf.vim
/usr/share/vim/vim73/syntax/config.vim

/usr/share/vim/vim73/syntax/dictconf.vim
/usr/share/vim/vim73/syntax/dictdconf.vim
/usr/share/vim/vim73/syntax/gitconfig.vim
/usr/share/vim/vim73/syntax/hostconf.vim
/usr/share/vim/vim73/syntax/kconfig.vim
/usr/share/vim/vim73/syntax/ldapconf.vim
/usr/share/vim/vim73/syntax/manconf.vim
/usr/share/vim/vim73/syntax/modconf.vim
/usr/share/vim/vim73/syntax/mplayerconf.vim
/usr/share/vim/vim73/syntax/pamconf.vim
/usr/share/vim/vim73/syntax/slpconf.vim
/usr/share/vim/vim73/syntax/sshconfig.vim
/usr/share/vim/vim73/syntax/sshdconfig.vim
/usr/share/vim/vim73/syntax/udevconf.vim
/usr/share/vim/vim73/syntax/xf86conf.vim

[/cc]

let’s check out those two:

[cc lang=”bash” escaped=”true” width=”600″]
vim /usr/share/vim/vim73/syntax/conf.vim
vim /usr/share/vim/vim73/syntax/config.vim
[/cc]

admin