Knowledge of the visual mode under Vim

Source: Internet
Author: User

Three modes of visualization:
v activates        the character-oriented visual mode, v        activates the line-oriented visualmode, and CTRL +v        activates the visual mode for the column block ;

Select Highlight Area:

The above v is a combination of commands that can be used with the jump instruction and the instruction range.

Such as: VL, Vaw,viw, VAP, Vgg, VG, VW,VB, vge, etc.;

Command:

GV: The last highlighted selection is re-elected;

O: Indicates the active end of the toggle highlight selection;

Tip: Whenever possible, use the operator command instead of the visual command;

In column block mode:

Once you have selected a piece, you can do the following:

A: Insert the content after the selected block;

I: Insert the content in front of the selected block;

D: Delete the selected block;

C: Delete the selected block and enter the insert mode;

R: Change the contents of the line to the specified character;

In addition, when the back is not aligned, you can use the $ key to select the end of the line, also, I and a can not be used, they follow the different conventions;

In row block mode:

D: Delete the selected block;

C: Delete the selected block and enter the insert mode;

R: Change the contents of the line to the specified character;

Reference: Vim practical Tips, Second edition, Drew Neil; translation: Yang Yuan, Che Wenlong;

Knowledge of the visual mode under Vim

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.