Learn the Vim tool using the Vimtutor command
1, K on J Lower H left L right;
2, I inserted before the cursor, a after the insertion of the cursor;
3. I insert the cursor at the beginning of the line, a moves the cursor to the end of the row, E jumps the cursor with each word;
4, d$ Delete the cursor to the end of the line;
5, the number 0 can be the cursor back to the beginning of the line, the cursor moves to the end;
6, DD command Delete whole line, 2DD delete two lines
7, U undo a single, U undo the whole line ctrl+r can be undone to the original state;
8, p after the last deletion of the content entered after the cursor;
9. Enter R and a character, replace the character of the cursor position with the new character;
10, using C to change the content, the C $ is removed from the cursor position to the end of the line, and into the insertion mode;
11, CTRL + G shows the cursor line and the percentage position of the article;
12, G moves the cursor to the last line of the document, GG moves the cursor to the first line of the document, and 500G moves the cursor to the 500 line position;
13,/String, finds the string specified in the document, n finds the string below the document, and N finds the character in the opposite direction of the document;
14, reverse lookup string, use the character command, will find the inverse direction of the string, using Ctrl+o (letter), back to the previous position;
15,% find pairs of parentheses and other symbols, (move the cursor to the first (symbol, and then the% symbol, the cursor will automatically jump to the corresponding);
16. s/thee/the/replaces the first find result of the current line, replaces thee with the field, s/thee/the/g, replaces the thee of the entire line with the character, and 100,200s/thee/the/g replaces 100 rows to 200 rows. Thee for the character,%s/thee/the/g, will replace the entire chapter thee the document; %S/THEE/THE/GC, replace one manual acknowledgment.
17, set number, display the document line numbers;
18, use! Add external command to implement command in Vim;
19, W filename, will be saved in the writing document as the filename document;
20. R filename Inserts the contents of the filename into the cursor, r!ls the output of the LS tool to the cursor after it;
21, lowercase o, will insert a row below the cursor and into the insert mode, capital O, will be inserted above the cursor line and insert mode;
22, R Replace the command, you can replace the characters, can replace multiple characters consecutively;
23, using Y Copy, p Paste, can be used, using V to enter the visual mode, to copy, V can enter the visual line mode;
24, set IC configuration ignores case when searching, set Noic disables ignoring case, set HLS highlighting find character set Nohls off highlighting
VIM Tool Learning