How to enable syntax highlighting while in vim.
First of all you have to install vim, the plain old vi doesn’t support syntax highlighting.
so,
# cd /usr/ports/editors/vim
# make install clean
Copy your old vi out of the way
# cp /usr/bin/vi /usr/bin/vi.old
now link it into your path
# ln -s /usr/local/bin/vim /usr/bin/vi
Now change to the user who you will be using for your editing, and set you startup options.
# su username
$ cd ~
$ echo syntax on >> .exrc
$ vi something
The result should be helpful color highlighting, which actually understands several document types.
|