Code Syntax Highlighting in VI (Linux Editor)

I recently wrote about how to enable syntax highlighting in the linux editor NANO.

Below i will explain how to enable such features in VI, as they are built in it is much easier.

Move to your home directory and create/open the settings file:

Shell
1
2
cd
vi .vimrc

Enable syntax highlighting:

Shell
1
syntax on

Save using:

Shell
1
:wq!

You will now have syntax highlighting enabled when using vi/vim as your editor of choice.

Posted: August 12th, 2011
Categories: Linux, Programming
Tags:
Comments: No Comments.