Howto use vim
From How2s
Vim is a highly configurable text editor built to enable efficient text editing. It is an improved version of the vi editor distributed with most UNIX systems.
Vim is often called a "programmer's editor," and so useful for programming that many consider it an entire IDE. It's not just for programmers, though. Vim is perfect for all kinds of text editing, from composing email to editing configuration files. vim.org (http://www.vim.org/)
Vimtutor
Vimtutor is one of the best methods for learning how to use vim. It is simply Vim running against a text file which gives instructions on how to use vim. Vimtutor can be aquired in most repositories. The text that vimtutor runs vim against is at http://www.cs.umu.se/~janl/vimtutor.txt
Commonly Used Commands
move about the file
cursor
insert data at cursor position (change to insert mode)
i
go to normal mode
esc
delete data at cursor position
x
delete line on cursor position
dd
delete word on cursor position
dw
undo
u
jump words
w
go to end of line
$
quit file
:q
save file
:w
save and quit file
:wq
force quit (ignore warnings, eg quit without saving)
:q!
force safe (ignore warnings)
:w!
search
/your search
jump to next search result
/
jump to line 123
123 gg
search and replace
:%s/search/replace

