Vim Learning Notes

Source: Internet
Author: User
Tags tag name uppercase letter

Vim Learning Note I, Mark (Mark)

We can mark the text so that it is easy to jump between different locations in the document.

Create tags

Moves the cursor to a line and marks it with a ma command. Where m is the tag command, anda is the name of the tag being made.

You can use either the lowercase letter A-Z or the uppercase letter A-Z as the tag name. A small letter tag that is used only for the current buffer, while the uppercase letters are marked to span different buffers.

For example, you are editing File1, but you can still use the ‘A command to move to the mark a created in File2.

Jump Markers

After you create a tag, you can use the ‘a command to move to the first non-empty character of the specified line of markup. Here is the single quotation mark. You can also use the `a command to move to the cursor position when you make a marker. Here ` is the inverted quotation mark (the one on the left of the number key 1).

Listing Tags

With :marks commands, you can list all tags. This also includes some special tags built into the system (special marks):

. Recently edited locations
0-9 Recently Used files
Recently inserted position
The position before the last jump
" Location of the last time the file was exited
[ At the beginning of the last modification
] At the end of the last modification
Delete Tag

If you delete a marked line of text, the markup is not saved. Not only can we use tags to move quickly, but we can also use tags to delete text, such as marking a line and ma then using d‘a it to erase the line.

Of course, we can also use the y‘a command to copy this line.

With :delmarks a b c a command, you can delete one or more tags, and the :delmarks! command deletes all tags.

With :help mark-motions commands, you can view more help information about the tag.

Command summary
m Create tags
Move to the beginning of a marked text
` Move to the cursor position of the marker
:marks Listing all tags
:delmarks Delete the specified tag
:delmarks! Remove All Tags

[1]. Vim Learning note mark (Mark) http://itindex.net/detail/5448-vim-%E5%AD%A6%E4%B9%A0-%E7%AC%94%E8%AE%B0

Vim Learning Notes

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.