The visual mode of VIM Basic learning

Source: Internet
Author: User

1. Select the mode
This mode must be entered through the visual mode. In the visual mode, we

<C-g> to use our visual selection as a block of action in select mode.


When we enter the visible characters, we will overwrite the block.
For example
AAA BBB CCC
Then we use <C-v> to select BBB, when we use <C-g> to switch the selection mode, and then enter Z, you will find
BBB turns into a, and we're in insert mode.

2.

o Switch Active end


Toggle active Endpoints in Visual mode
When you block the visual mode, and then move, the coverage area will verify your direction change.
And the point of change that follows your direction is the active endpoint.

3.

A-I Visual mode, bulk operation of the visual content block


For example
AAA BBB CCC
Aaaaa
bbbbbb
What would you do if you wanted to add ";" at the end of the three lines above?
Then we can use a to achieve it.
First we use <C-v> to select the end of the above three lines, and then we press A to enter insert mode, you will find
Only after the CCC has been added; don't worry, we'll press <ESC>, and we'll find out. Tried the downlink visual mode and found
is not possible. I was the same thing.
Note that a and I do not work because they are used as text objects in visual mode.

The visual mode of VIM Basic learning

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.