Dave Perrett

Turn on Vi Syntax Coloring

linux, programming, quickie, vi

Firstly, check that the vim-enhanced package is installed :

1
rpm -qa | grep vim

You should see something like :

1
2
3
vim-common-6.2.98-1
vim-minimal-6.2.98-1
vim-enhanced-6.2.98-1

If the vim-enhanced package is not installed, download the package and run :

1
sudo rpm -i vim-enhanced-6.2.98-1.rpm

You will probably have to exit your terminal and reconnect before any changes are visible.

If you are still having problems, check that the line

1
syntax on

is uncommented in /etc/vimrc. If you want to customize coloring for different users, copy /etc/vimrc to .vimrc in your home directory, and make the changes there.

You might also want to turn off the annoying search highlighting by commenting out the line

1
set hlsearch