Brisk Vim (iv): Modify

Source: Internet
Author: User

I think every coder has a deep understanding of how important it is to modify this operation in the world of code.

Instead of modifying it, it's nothing more than removing it and inserting it, but Vim combines it with efficiency.

Talk less, let's use this brisk vim to dance on code again

Character substitution

R            Single character replace r            continuous Replace ~           Change case

It's easy, just try it.

tips:4~ Changing the case of 4 characters in a row is interesting

Word modification

CW            change from cursor to end of Word CB            changes from cursor to beginning of Word

Here the direct use of CW or CB operation is very simple, it is important to note that the use of numerical methods

2CW or c2w can be used at this time, the same function

Row modification

            C $ from the cursor to the bank at the end of the C.             function            as C0 from the cursor modification to the beginning of the bank cc            delete the whole line from the beginning to modify the S             function             , the same as s remove the character at the cursor location

It's a little hard to remember, it's mostly more practice to see the effect.

where C + + functions are the same, from the cursor to the end of the line, d$+a achieve the same effect

C0 and D0+i effect, the difference is less input once

CC and S effect is the same, in fact, S is the category of INSERT, here is similar, so together talk about

Again is S, it will delete the word Fu insertion at the cursor, the effect is equivalent to X+i or c+space

Multi-line modification I don't want to say that, with the number and the combination command on the front.

From the above, we should be able to understand more deeply that most of the commands in Vim are used in combination

Make use of this to find out your habits faster and modify them efficiently.

Brisk Vim (iv): Modify

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.