All Developing, Hacking & Cracking Codes with Bots

Tuesday, September 20

Vi Editor Some Basic and Important Commands

1. vi filename --> File is to be created
2. press i --> go to insert mode
3. press esc --> enter in command mode
4. press esc and : --> go to last line mode
5. moving cursor left,right,up,down --> h,l,k,j
6. go to end of the line --> Shift + A
7. delete character under cursor --> x
8. quitting without saving --> :q!
9. quitting with saving --> :wq
10. Shifting cursor to start of line --> Enter
11. Shifting cursor to Home --> h
12. Deleting line under cursor` --> dd
13. Repeating Last Command --> .
14. Undoing last command --> u
15. Save current file without quitting --> :w
16. move to last line of file --> :$
17. execute cmd as a shell command --> :!'cmd'

No comments: