[ESC] Command mode
1. J K H L up or down
2. x Delete Current character I enter edit mode a current word specifier insert
3. Action options for the D motion delete operator operator
1. DW is removed from the cursor to the beginning of the next word, excluding the first character
2. d$ Delete from the current cursor to the end of the line
3. The de cursor is currently deleted to the end of the word, including the last character
4. DD Delete the entire line number DD deleted n rows
4. P places the last deleted content after the cursor
5. Entering a number before the action repeats the action multiple times
1.2w cursor moves forward two times
2.3E cursor moves forward to the end of a third word
3.0 move the cursor to the beginning of the line
4. D Number Motion
6. C Change class operator C [number] Motion
1. In motion parameters (motion), W represents the word, and $ represents the end of the line.
7.G Positioning and file status
1.GG cursor jumps to the first line of the file
2.G cursor jumps to the last line of the file
3.number G jumps to the specified line
8./Add a string to find the string in the current file
1. N Find Next n reverse Find Next
2. Reverse lookup? Find
3. Ctrl-o back to previous position ctrl-i jump to a newer location
9. R: Enter R and a character to replace the character at the cursor location
10.%: Find a pair of parentheses),},]
s/old/new/g: replace old with new
1.s/old/new: This changes only the first matching string in the line where the cursor is located
2. s/old/new/g: Replace all rows of matching strings
3. #, #s/old/new/g: #, # represents the line number of the two lines in several rows of the replace operation.
4.%s/old/new/g: replace each matching string of the entire file
5.%S/OLD/NEW/GC: Finds each matching string in the entire file and replaces each matching string hint
o Open a new line below the cursor and enter insert mode
O open a new line above the cursor and enter insert mode
E: Keep the cursor at the end of the word
W: Place the cursor at the top of the word
A: Insert at end of entire line
Crtl-d: Vim displays a list of all the commands that match it
TAB: Automatically complete, in order
: Command mode
1. q! Exit (do not save) Wq save file and exit
2. Set Number: Show line numbers
3. Set Autoindent: Auto Indent
4. Set tabstop=4: Set Tab key width to 4
5. Set Ruler: Displays the status line of the cursor position in the lower right corner
6. Set Cursorline: Highlight when moving forward
7. Set Nobackup: Do not back up when overwriting files
8.! Input The external command can then be executed immediately after entering an external command
9. W FILENAME: Save the contents of the current file to a file
Ten. V motion:w FILENAME
Save the selection to a text, or press D to delete the selected text.
11.R FILENAME: Inserting the contents of another file into the current file
R! Command: Reads the output of the command and places it behind the cursor position of the current file
[20160815]vim Getting Started command summary