Turn on syntax highlighting for vi and vim in Mac OSX (OS X)

To enable the syntax highlighting for vi and vim in Mac OS X, you have to create a  text file named, “.vimrc”, in your home directory with the following content:
set nocompatible
syntax on

You can also change the color highlighting schema, by typing :colorscheme followed by an space and tab.
Hit tab repeatedly to loop over the available options and then hit enter to choose one.
You can also set your default color highlighting schema in the “.vimrc” with “colo schemaname“:
set nocompatible
syntax on
colo default
The available schema names are those folder names inside the folder “/usr/share/vim/vim73/colors/” 
 

About

Search

PISIKA Copyright © 2009