Record several operations commonly used in VIM
Getting Started Guide
~ vimtutor~
1. Vim is case-sensitive 2. VIM Move Cursor
H Move Left
J Move Down
K Move Up
L Move Right
In fact, the use of the arrow keys can also be moved, but familiar with some other editor or browser can also be used
3. Delete in Vim
x Delete the letter where the cursor is located
DW Delete Complete Word does not include trailing punctuation
DD Delete entire row
D Delete entire row
2017-4-25
4. Vim Moves the line
: M 12 If the current line number is line 10th, move the current row to line 12th
Moves the current row to line 13th if the current line number is line 20th
: M 0 moves the current line to the front of the first row
: M $ moves the current line after the last row
: The space behind M can be omitted without writing
5. Vim moves multiple lines
: m5,7m 21 Move line 5,6,7 to line 21st
: m5,7m 0 Move the 5,6,7 line to the front of the first line
: m5,7m $ moves the 5,6,7 line after the last line
:.,. +4m 21 moves the 5 rows from the current line to the 21-row position
: +4m21, like the previous command, can be omitted. and spaces
6. Undo last action in vim
U undo
2017-04-26
7. Vim jumps to the last line or the first line
G jumps to the last line
GG jumps to the first line
2017-04-298. Vim jumps to the specified line
: 6 + Enter jump to line 6th
6G Jump To line 6th
6gg Jump To line 6th
Cond...
My-vim-wiki-doing