Some of the most common Vim editor shortcut keys:
h","j","k","l", respectively, control the cursor left, bottom, up, and right one grid.
Press "ctrl"+"b": The screen moves one page to the back.
Press "ctrl"+"f": The screen moves one page to the front.
Press "ctrl"+"u": The screen moves the half page toward the back.
Press "ctrl"+"d": The screen moves the half page toward the front.
"0" by number: Moves to the beginning of the article.
Press "g": Move to the end of the article.
Press "$": Moves to the end of the line where the cursor is located.
Press "^": Moves to the beginning of the line where the cursor is located
Press "w": Cursor jumps to the beginning of the next word
Press "e": Cursor jumps to the end of the next word
Press "b": Cursor back to the beginning of the last word
Press #l: The cursor moves to the first # position of the line, such as: 5l,56l.
"x": Deletes the current character every time it is pressed.
#x: For example, "6x" represents the "after" 6 characters of the location where the cursor was deleted.
"x": Uppercase X, each time it is pressed, deletes the "front" character at the location of the cursor.
"#X": for example, "20x" represents the "front" 20 characters of the location where the cursor was deleted.
"dd": Delete the line where the cursor is located and fill it with the next line.
#dd: Deletes the # line starting at the line where the cursor is located.
"#G":"15g", which means moving the cursor to the beginning of line 15th of the article.
"w": Enter the letter "w" the colon to save the file.
"q": Press "q" is to exit, if you cannot leave VI, can be "q" followed by a "!" Force to leave Vim.
"wq": Generally recommended to leave, use with "w", so you can also save the file when exiting.
ZZ immediately saves the file and exits.
P Paste
U undo Once
Ctrl+r anti-Revocation once
Multi-window function: In the command line mode input: SP, so that two files can be displayed on a screen at the same time, and then press CTRL + W, and then release all the keys, and then press the DOWN ARROW key or UP ARROW key to select the window, if you want to close a window, directly: Q.
Some of the most common Vim editor shortcut keys: