Vim set marks

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.