Install
In linux terminal
sudo apt-get install vim
Use vim
Let file name if foo that we want to edit using vim editor
- go to foo file directory and write
vim foo
Hit the Esc key; that goes into command mode. Then you can type
:qto quit (short for:quit):q!to quit without saving (short for:quit!):wqto write and quit (think write and quit):wq!to write and quit even if file has only read permission (if file does not have write permission: force write):xto write and quit (shorter than:wq):qato quit all (short for:quitall)
Cheet sheet
(vim cheet sheet )[http://www.fprintf.net/vimCheatSheet.html]