Vim in the compiler. Command (Point command)

Source: Internet
Author: User

Date: 2014.06.28

Location: Base

--------------------------------------------------------------------------------------

Note: In order to illustrate the use of vim under the. Command salutation as Point command

First, point command brief

The VIM document probably says this: the function of the point command is repeated the last change.

So what we should understand is what was the concept of the last change? What size or range the last change was.

The unit of the last change can be:

A. Changes to a character (for example, deleting a character)

B. Changes to a row (for example, deleting a row)

C. A change to the file (for example: Enter the insertion mode to exit the Insert mode all key operation)

--------------------------------------------------------------------------------------

second, the operation of the point command

Against the above. The point command is repeated for the last action:

1. For example at a certain moment. We use the x name to delete the characters under the cursor . This creates a character operation under the delete cursor. Then we use the Point command. Then it will run a character operation under the delete cursor.

2. For example at a certain moment. We use the DD command to delete the line where the cursor is located , thus creating an operation that deletes the row of the cursor. Immediately after we use the Point command, we run the delete current cursor row operation.

3. For example, at some point, we use the >g command to add indents from the end of the document at the current line . This forms an indent part of the document operation. Immediately after we use the Point command, we run the indent from the current cursor to the end of the document.

In these x DD >g operations above. These three commands are commands that run in normal mode. Another scenario is:

4. Whenever we enter the insert mode, a change unit is formed, that is, from the insertion mode until the normal mode is returned, all keystrokes will be recorded as one change operation, then we use the Point command. This is equivalent to putting all the keys of the above record all over again, including entering the Insert mode command and exiting the Insert Mode command, with a mathematical set of expressions, this time the change is a set of key operation sets: [I. ...] ESC], using the Point command on a secondary basis is equivalent to pressing the key in the collection but all runs once. The performance of repeatedly appending content files.

Copyright notice: This article blog original article. Blogs, without consent, may not be reproduced.

Vim in the compiler. Command (Point command)

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.