1. Navigate to 1.1. view the row number
: Set numberShow row number
:. =Display the current row number at the bottom
: =Display the total line number at the bottom
1.2. move the cursor
0^Move the cursor to the beginning of the current row
$Move the cursor to the end of the current row
WMove to the start of the next word
BMove to the beginning of the previous word
: 0 1gGgMove to first line
:NNGMove to row n
: $GMove to the last row
2. copy and paste 2.1. Select multi-row copy based on the row number
: 1, 10t20Copy the contents of rows 1st to 10 and paste them to the end of rows 20th.
: 1, 10 t.Copy the contents of rows 1st to 10 and paste them to the end of the current row.
: 1, 10yCopy 1st to 10 rows to the clipboard.
2.2. Copy a single row or multiple consecutive rows
YYCopy current row
NYYCopy the current row and its subsequent N-1 rows.
PPaste the content in the clipboard in the current row.
3. Search 3.1. query string
/StringSearch for the string in the forward direction.
?StringReturns the string.
NSearch for the next one in the current order.
NSearch for the next one in reverse order.
4. Edit 4.1. Undo and restore
UCancel operation
<Ctrl> rRestore operation
4.2. Insert text
IInsert before cursor
IInsert at the beginning of the current row
AInsert after cursor
AInsert at the end of the current row
OInsert the next row
OInsert the last row
4.3. edit text
RReplace a single character covered by the cursor
RConsecutive replacement of a single character covered by the cursor
CWReplace the word behind the cursor
CNWAfter replacing the cursorNWords
CCCClear current row
NCCCNCClear currentNLine
4.4. delete text
XDelete a single character overwritten by the cursor
NXDelete n characters after the cursor
DWDelete the word after the cursor
DNWDelete n words after the cursor
DDelete the content behind the cursor.
DdDelete current row
NDdDNDDelete n rows after the current row
:X,YDDelete row X to row y