19 12 / 2011

Syntax Highlighting for Mac Vi

Run

sudo vi /usr/share/vim/vimrc

Insert..
syntax on "turns on highlighting
set ai "turns on auto indent
set nu "turns on line numbers

I am not setting syntax on and set nu as auto in the rc file.
Perfer to turn them on as needed.

19 12 / 2011

Multiple windows in vi

:sp (horizontal)
:vs (vertical)

CTRL+W hjkl or up, down, left right to move around.

19 12 / 2011

Quit Vi easy mode

Found myself stuck in Vi easy mode.

CTRL+L
:qa!

Quit without saving