vim usage

Basic usage
of vim Because you are used to the vim editor, you will often use vim shortcut methods, so here is a summary of the usage in vim. The
following non-editing mode and non-command line mode (normal mode)
G: Jump the cursor directly to the last line of the file
gg: Jump the cursor directly to the first line
0 of the file: the beginning of the line
$: the end of the line
n<Enter>: n is a number, <Enter> is the Enter key, move the cursor down n lines
ngg: n is a number line number, move the cursor to the specified line
H: move the cursor to the first line of the current window
M: move the cursor to the middle line of the current window
L: move the cursor to the last line of the current window

The following is the search and replacement in normal mode
/laodou Search the loadou string downward
from the current position? laodou Look up the laodou string from the current position
n Repeat the previous search action downward
N Repeat the previous search action upward
yy Copy the cursor current Line at position
nyy Copy the next n lines at the current
cursor position p Paste to the next line at the cursor position
dd Delete the line at the cursor position
u Roll back the previous operation
. Repeat the previous action

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325856070&siteId=291194637