While using VI for many years, there are lots of materials in the man page or some other manual all talking about vi. But I did find some commands which are used quite often during my work with *NIX* like operation system (AIX, MAC, LINUX, CYGWIN, etc.).
- command mode and input mode switch $>ESC
- navigating right #>l
- navigation left #>h
- navigation up #>k
- navigation down #>j
- go to line end #>$
- go to 50th line #>50G
- go to first line #>1G
- go to last line $>GG
- go to line head #>0
- start a new line #>o
- delete current line #>dd
- copy current line inside vi #>yy
- paste line copied inside vi #>p
- delete current character #>x
- replace current character #>s
- insert at current position #>i
- page up #>CTRL b
- page down #>CTRL f
- append at end of current position #>a
- reload current file #>:edit
- close w/o save the file #>:q!
- save the file #>w
- save and close the file #>:wq
- to remove control m characters (type ctrl v ctrl m for ^M)#>:%s/^M//g
- …more coming soon