The. command under the vim Compiler (point command)

Source: Internet
Author: User

Time: 2014.06.28

Location: Base

Bytes --------------------------------------------------------------------------------------

Note: To illustrate how to call the. Command in VIM as a point command

I. Brief introduction to some commands

The Vim document is like this:Click the command to repeat the last modification.

What is the concept of last modification? The granularity or range of the last modification.

The last modified unit can be:

A. modify a character (for example, delete a character)

B. modify a row (for example, delete a row)

C. Modify the file once (for example, entering the insert mode to exit the insert mode)

Bytes --------------------------------------------------------------------------------------

2. Click command operations

For the above, the point command is to repeat the previous operation:

1. For example, we useX name: the characters under the cursor are deleted.In this way, a character operation is formed to delete the cursor. Then we use the dot command to delete a character operation under the cursor.

2. For example, we useDd command DeleteThe cursorOne rowIn this way, an operation is performed to delete the row where the cursor is located. Then we use the dot command to delete the row where the current cursor is located.

3. For example, we use> The G command is used to increase the indentation from the end of the current line.In this way, an indent part of the document operation is formed. Then we use the dot command to execute the indent operation from the current cursor to the end of the document.

In the preceding x DD> G operations, these three commands are all executed in normal mode, and the following is another case:

4. every time we enter the insert mode, a unit will also be changed, that is, starting from entering the insert mode until the normal mode is returned, during this period, all button operations will be recorded as one modification operation. Then, we use the dot command to re-press all the buttons recorded above, this includes the insert mode command and the exit insert mode command, which are expressed in a mathematical set. This change is a set of key operation sets: [I ....... ESC]. Using the dot command on the basis of the second operation is equivalent to executing the key operations in the set again, as the file appends duplicate content.

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.