shellspells beta

vim

vim [options] [file ..]
vim [options] -
vim [options] -t tag
vim [options] -q [errorfile]

vim is a modal text editor

Vi epitomises all that is great about the UNIX way of thinking. It has a very steep learning curve and without takling time to learn the commands a new user would get lost very quickly. However, with a bit of effort you will soon have the most powerful and efficient text editor at your fingertips.

See here for a vi command reference.

See here for a vim cheat sheet.

Tips

Examples

Regular expressions

:g/^\s*$/d       # delete all blank lines
:g!/string/d     # delete lines not containing string
:g/fred/,/joe/d  # delete across lines