linux common commands of vim

dd delete a single line
1,2,3 1,2,3 dd delete line

yy copy a single line
1,2,3 1,2,3 lines yy Copy

p paste (according to the number of replication)
l, 2,3 paste p. 1 , 2 , p. 3 lines * (* The number of a copy number)

i add data to the front of the current cursor position
a to add data to the current cursor position
$ moved to the last position of the current row
0 is moved to the frontmost position of the current line
o a new line below the current line and the mode changes to insert
O new current line from the top row and insert mode to the
first operation on the undo U
:! Q quit without saving
: x save and exit
2 ↑ cursor up by two rows
2 ↓ cursor down two lines
: n moved to the n row
ctrl + g Total lines appears lower left corner
: set number display line number
: / honey search entitled 'honey' string Find a position command 'n', 'N' is to find a location

Guess you like

Origin www.cnblogs.com/zpchcbd/p/12116997.html