It is worth mentioning that the PDF version of my vim tutorial has been completed. You can download it. Here is the download of csdn: csdn. If the download fails on the left, you can also enter the following address in the browser to download: http://download.csdn.net/detail/xinguimeng/7714213, of course, if you are a loyal user of Baidu network disk, you can also use Baidu network disk, I also synchronized upload to Baidu network disk, below: Baidu Network Disk download, if the address is Hung, you can enter in the browser: http://pan.baidu.com/s/1sj9CLXz to download.
Following the preceding three sections, we will continue to learn some commands for operating the text content. These commands have a fixed mode: operator commands + displacement commands. First, we will enter an operator command, then we followed a displacement command, the so-called displacement command, which we explained earlier, that is, the command to move the cursor. For example, W indicates moving backward to the first letter of the first word, 4 W indicates moving backward to the first letter of the fourth self-word.
* ********************** Operator command *************** *****
1. Run the X command to delete a character. You can use 4x to delete four characters.
2. The D command is the first letter of "delete", indicating deletion. It is followed by a displacement command, indicating deletion. DW means to delete a word, while d4w means to delete four words.
3. Both d4w and d4e can be deleted from the cursor and four words can be deleted. However, the difference is that d4w will delete the space behind it, and d4e will retain the space.
4. Because the $ command moves the cursor to the end of the line, D $ indicates that the content at the end of the line is deleted from the current position, and the last character of the line is also deleted.
5. The C command is similar to the D command, but it enters the insert mode after the command is executed. For example, the CW command First deletes the word and then immediately enters the insert mode.
6. the DD command deletes the entire line, while the CC command changes the line.
8. The C command can be understood as the first letter of the word "change", indicating "Modify, change ".
********** **********************
1. We can see that the X command and the DL command are the same. They both Delete the characters under the current cursor, and the X command is DH, indicating to delete the characters on the left of the current cursor. Sorry, let's talk about it. l indicates moving one cell to the right, and h indicates moving the cell to the left. This is what we learned in Section 2. Remember.
2. the D command indicates d $, indicating that the content is deleted to the end of the line, and C indicates C $, indicating that the content is modified to the end of the line, and s indicates Cl, that is, modifying a character, s indicates CC, that is, a whole line of content is modified.
********************* **********
1. If the reader is a child shoes who like to shoes, then he will find that d4w and 4dw have the same effect. They all delete four words. Are they the same?
2. the answer is that the results must be the same, but the execution process is different. d4w deletes four words at a time, while 4dw deletes the DW that has been executed four times, delete a word each time.
3. In fact, we can use 4 d3w to delete three words each time. If the words are deleted four times, 12 words are deleted.
* ******************** Other commands *************** **********************
1. The R command is "replace", indicating that the character at the current position is replaced by the character we typed. For example, RX replaces the character at the current position with X.
2.5rx is replaced by X, which is a string of five characters after the character.
********************* *****************
1. This section describes common commands in Vim. I won't be able to use them here, but the upload and insertion speed is too slow.
2. I suggest you download the PDF file that is recommended in this blog article, which provides more details.
3. Xin Xing vim, looking forward to your attention.