Description | Command |
---|---|
Up, down, left right | k , j , h , l |
Jump words (& back) | w , b |
End/beginning of line | $ , ^ /0 |
End/beginning of file | G , gg |
Line numbers | set number |
Page Down | Ctrl + d |
Page Up | Ctrl + b |
Replacing strings | :%s/local/localhost/g |
Search | / , write start, and press enter |
Turning syntax highlighting for vi and vim in Mac OS X is as simple as creating a file called “.vimrc” in your home folder with the following content:
set nocompatible
syntax on