Vim Visual mode

Source: Internet
Author: User
Tags lowercase

Visual Mode 1. Introduction to Visual Mode commands
    • Enter in normal mode v (lowercase), enter the character selection mode, you can move the cursor, where the cursor will be selected. The selection is deselected when the V-meeting is pressed again.
    • In normal mode input Shift+v (lowercase), enter the line selection mode, press V will be the entire row selection, you can move up and down the cursor select more rows, again, press once Shift+v can be deselected.
    • In normal mode Ctrl+v (lowercase), this is the area selection mode, you can select the rectangular region, and then cancel the selection by one time Ctrl+v .
    • Enter d Delete Selection area contents in Visual mode
    • Enter y Copy selection area contents in Visual mode
2. Visual Mode Command Practice

Copy the practice file to the current directory

$ cp /etc/protocols .

Open the practice file

$ vim protocols
    • In normal mode 9G , jump to line 9th, enter Shift+v (lowercase v), enter the visual mode for row selection, select 5 rows, press >> indent, indent 5 rows into oneshiftwidth
    • Enter in normal mode Ctrl+v (lowercase v), enter visual mode for rectangular area selection, select the first column character and then x delete the whole column

Vim Visual mode

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.