Vim Find and replace

Source: Internet
Author: User
  • Find
  • Replace

In normal mode

1. If you want to replace only one letter, enter FA to find the next letter A, enter r and type the letter you want to replace a.

2. If you want to go directly to edit a lot of letters, enter R, enter the REPLACE State, start any edit, press ESC to exit.

3. If you want to recall the previous step, enter u directly in normal mode

4. >>,<< is the shrink symbol

To view the current shrinking settings, first go to commandline, then enter set Shiftwidth?

If you are not satisfied with the current shrinkage distance, you can set it up and enter CommandLine, and set shiftwidth=10

  

5. Previous write if a letter is found, such as entering FA in normal mode, then the next a is searched.

6. What if I want to find a word or a string? Input/about (This is shown in the lower left corner) [/backslash],

If you want to continue looking for the next, then enter N (down) or n (UP)

    

Vim Find and replace

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.