Brisk VIM (2): Insert

Source: Internet
Author: User


In the previous section, we talked about the movement in VIM. Now that it is enough to be able to work in the screen and in the optical area, let's talk about the INSERT command. I don't know how many new VIM users are like me (last year, I can only insert it. Now I think it's ridiculous. It's all about the Windows Editor with a little mouse over the results. Mom no longer needs to worry about text insertion ...... Tragedy!
Www.2cto.com is good. Let's discard the past. From now on, it may not be too late. This is the second section of the brisk VIM series, which is constantly updated, join more tips here to cheer for VIM beginners. Let's sum up and practice together ...... Base character position insert I insert before cursor
A append the cursor to you. In fact, it is enough to use the two at the beginning. This is the most basic reason. Why? Because you can rely on the Move command in the previous section to reach any location, and then insert it vigorously, one of the most important tips in VIM is to use the combination of commands to insert A to the end of A row at the position of the advanced row www.2cto.com.
I insert at the beginning of a row
O open the new line insert in the next line of the cursor
O open the new line insert in the last line of the cursor. Of course, if you think moving the cursor first and then inserting or appending is slow, in this case, we should use the above methods as a line unit. Here, I still need to remind you that adding a number before the command indicates the number of executions. tips1: 10I * <Esc> enter 10 first, then enter I, enter *, and then press <Esc>. Then, you can enter ten ** tips2: Similarly, 5o ### <Esc> enter 5 first, enter o, then enter ###, and then press <Esc>. Then, you can insert at the beginning of each row in the following five rows ###. As a result, it's easy to input duplicate text, right? You can try to expand your mind ...... However, I am still tired of reminding you that the combination of commands is also one of the most important techniques to merge rows. Sometimes you may want to merge two rows J and merge the two rows. You only need to move the cursor to the first line, then press 3 J.

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.