Syntax highlighting is a sysadmin’s dream, it allows you to code more efficiently or easily parse through relevant information in config files. To get vim syntax highlighting to work in Lenny, you first need to install vim – as the base version (vim-tiny) does not support syntax highlighting.
# aptitude install vim
Then edit /etc/vim/vimrc and go to line 20 and remove the quotation in front of ‘syntax on’ so it looks like this:
# vi /etc/vim/vimrc
" Vim5 and later versions support syntax highlighting. Uncommenting the next " line enables syntax highlighting by default. syntax on " If using a dark background within the editing area and syntax highlighting " turn on this option as well
Finally save by hitting ‘:’ and type ‘x’ then enter. (There are many ways to save and quit in vim, such as replacing the ‘x’ with ‘wq’ or just simply hitting ‘ZZ’)