Some hints and tips for vi/vim.
:NNN
NNNdd
NNNyy
p
u
CTRL+r
.
cw
start,end s/string1/string2/g
:w
:x :wq
:q!
:set noai :set noautoindent
:set ff=unix :set encoding=utf-8 :set fileencoding=utf-8