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.