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
[/cc]
i like 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]
liked this article?
- only together we can create a truly free world
- plz support dwaves to keep it up & running!
- (yes the info on the internet is (mostly) free but beer is still not free (still have to work on that))
- really really hate advertisement
- contribute: whenever a solution was found, blog about it for others to find!
- talk about, recommend & link to this blog and articles
- thanks to all who contribute!