ex help

Vi is built on top of an older command line oriented editor called ex. (Ex and Vi are actually different interfaces to the same program.) One-line ex commands are accessable from vi by typeing : followed by the command.

:w write the file out
:q exit (if you don't need to save)
:wq save and exit
:set set options
all list all settings
ai autoindent
noai no autoindent
sw=4 shift width -- used with autoindent and the shift operators < >

Searching /string