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
:q
to quit (short for:quit
):q!
to quit without saving (short for:quit!
):wq
to 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):x
to write and quit (shorter than:wq
):qa
to quit all (short for:quitall
)
Cheet sheet
(vim cheet sheet )[http://www.fprintf.net/vimCheatSheet.html]