Vim block operation

Source: Internet
Author: User

first, the visual modeThere are three ways to enter the visual mode: V,v,ctrl+v(1) Press V to enable the visual mode, you can select the content by a single character,The move cursor can be selected.such as:
(2) Press V to enable the visual mode, immediately select the cursor line, select the content by one-line character, move the cursor can be selected.


(3) Press CTRL + V to enable the visible column block mode, you can select a single character in the column direction, move the cursor to select

Second, the block mode
CTRL+v, enable block visual mode, then move the mouse, you can select a rectangular block, for a regular table can use this function. currently the cursor is located in the lower right corner, you can move the cursor at the corners of the block, by pressing O,o to toggle four vertices.

(1) Delete or cut operation (a), press "D" to delete the selected area
(b), press "D" to delete the selected area and the data behind the row

(2) input Operation
CTRL+v, go to column block mode and select where you want to add the content

Press "I" to enter insert, then enter "//" (the character you want to enter)
then press "ESC" to enter the characters you want to enter in the other lines.

(3) Copy and pasteCTRL+v, go to column block mode and select what you want to copy

Press "Y" to copy the content, 4line yanked description four lines copied

then move the cursor to the beginning of the line, press "P" in the following column of the cursor to enter the content, press "P" in the previous column of the cursor to enter the contentPress "P" effect according to the effect of large "p"


Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Vim block operation

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.