VIM supports syntax highlighting of a lot of different types of files,
from C code to Apache configs. To make sure you’re using the syntax
highlighting, execute the following command:
:syntax on
If the highlighting doesn’t appear, you may need to tell VIM what kind
of file it is you’re editing:
:se filetype=apache
Typing “:filetype” and hitting <ENTER> will tell you what type VIM
thinks the file is currently.
All this is done automatically on most installations of VIM. So what if
you log in to a server and the syntax highlighting is working, but you
can’t read it because of the colors?
Change the colorscheme. Type “:colorscheme ” (note the space) and hit
tab. VIM will cycle through the names of all the colorschemes currently
installed. I kind of like ‘desert’ on most systems. Experiment and find
one that works for you.
Happy VIMing!
- David Roth

