Shortcuts for vi editor


1.Press "G" and Directly goto Last Line of a file.
2.Press "g" and Directly goto First Line of a file.
3.Press "dd" to delete/cut the given line.
4.Press "dw" to delete the word.
5.Press "cc" to replace the word.
6.Press "yy" to copy the given line.
7.Press "p" to paste the copied line.
8.Press "i"/"a" to get into insert mode.
9.Press "o" and get newfresh line downwards.
10.Press "O" and get newfresh line Upwards.
11.Press "Esc + :wq!"to write quickly and forcefully to a file.
12.Press "Esc + u " for Undo
13.Press "Esc + r " for Redo

Comments

Popular Posts