Add colour to "vi"


If you use "vi" to edit files, then you should definitely switch to "vim". Vim is a highly configurable text editor built to enable efficient text editing. It is a vastly improved version of the vi editor; in fact Vim stands for "VI iMproved".

``But'', you say, ``I am happy with vi, I don't want to learn a bunch of new commands.'' Even so, you should still switch to "vim" because all the "vi" commands with which you are familiar work in "vim", and, in addition, you get "syntax hilighting". What syntax hilighting does is let you view your files in colour while editing them. Look at this snapshot of a latex file in "vi" and compare it to this snapshot of the same file in "vim". If you use a terminal with a dark background, then the corresponding snapshots are this one for "vi" and this one for "vim".

Vim provides syntax hilighting for various file types such as tex, html, c, fortran, maple, and many, many more.

To use vim simply type "vim filename" (without the quotes).

Alternatively, if you put the following line

alias vi vim

into your ".cshrc" file, then vim will automatically be involked in place of vi.

You can find out more about "vim" from http://www.vim.org.
NOTE: In order for this to work, your xterm must be colour enabled (see Tip #6).