In vim, the purpose is to quickly locate and improve efficiency.
1. Mark the command
Use help mark in VIM command line mode to view the help manual of the Mark command
2. Mark
Use 26 tokens (A to Z) in the text ). These tags are invisible, but they are only remembered by VIM.
3. Set the tag
In normal mode, the command format is m [A-Z].
For example, Ma sets a tag at the cursor position.
4. Jump to the tag
Command Format: 'tag'
'Is not a single quotation mark. This command can jump to the position of the row and column where the tag is located.
The command to move to mark a is:
'A
Command Format: 'tag'
'Is a single quotation mark. This command only moves to the beginning of the line that marks the row.
The command to move to the beginning of the line marked as a is:
'A
5. View to set the tag
In command line mode
: Marks
You can use the following command to obtain a list of all the tags. Vim will also list the write tags recorded by himself.
6. Some labels automatically set by VIM
'Position before jump
"Last edited location
[Start of the last modified position
] End of the last modified position
7. Delete tags
Command: delmarks Tag Name
The Vim plug-in visualmark. Vim can also be used to mark and visible. After installing this plug-in, if there is a default key conflict, VIM opens
Plug-in, replace it, and set a new ing key in vimrc, for example:
NMAP <silent> <leader> n <plug> vm_goto_next_sign
NMAP <silent> <leader> P <plug> vm_goto_prev_sign