1. Label
(1) Nameless label
": This is two single quotes, meaning to jump back and forth two times before and after the jump.
<c-^>: Jump back and forth between two file, is the "Global version of the command."
<c-o>: Very familiar, jump back, O means older.
<c-i>: Contrary to O.
Note: The jumps of O and I are all global jumps.
(2) Single file label
M x:x represents a-Z lowercase letter, and m represents the position where the current cursor is mark,mark.
' x: Jumps to the X-marked position, ignores the original number of columns, and jumps to the beginning of the line.
(3) Global label
M x:x represents any uppercase letter of a-Z and can jump between arbitrary files, which is global mark
' X: The command to jump to somewhere.
Note: In fact, the core command of the jump is '
It can be paired with letters and can be paired with different symbols.
①' last jump to the place
②" The position of the cursor at the last time you left (where you last edited)
③. Where the last change was made
2. Some commands for multiple documents
: Edit XXX: Do not quit Vim, close the current file, open the xxx file, note that the current file should be write before the line.
Vim x1 X2 X3: Open multiple files at the same time
: args: View open file, and what file you are now, you can abbreviate: AR
: Next: Next, you can abbreviate: n
: Wnext: First Write and Next, you can abbreviate: WN
:p revious: Previous
: First: One
: Last: Final
3. Transfer data between Files
(1) Ordinary Yank and put
(2) Register
"x:" is a double quote, indicating that the register x,x is a-Z letter.
The usage also must cooperate with small change inside operator to use
For example: (register + operator) + motion
For example: visual+ (register + oprerator)
This will save the contents of multiple blocks and put them once
(3) appending
: Write >> target: Append the current file to the target file.
You can append specific content through visual.
4.view and rename
(1) View
Half Read-only:vim-r x or view X
Can be modified by forcing W.
All Read-only:vim-m X
Can't be modified at all
(2) Rename
: SaveAs XXX: Renaming a copy
: File XXX: rename this file to xxx