mobilege / Vim Documentation tldr
vim file.txt
- starts off in Command Mode
iCommand Mode -> Insert ModeEscInsert Mode -> Command ModevCommand Mode -> Visual Mode -> Command Mode
dd delete line
5dd delete 5 lines
yy yank (copy) line
5yy yank (copy) 5 lines
p paste line below
P paste line above
gg go to first line
5gg go to line 5
G go to last line
0 go to beginning of line
$ go to end of line
:wq save & exit
:q! exit without save