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 Visual mode, to select content by a single character,Move the cursor to select.such as:
(2) Press V to enable the visual mode, immediately select the cursor row. Select content by one-line character. Move the cursor to select.


(3) Press CTRL + V to enable the visible column block mode. Ability to select individual characters in the column direction, move cursor to select

Second, the block mode
CTRL+v, enable block visual mode, and then move the mouse. The ability to select a rectangular block can be used for a regular table. at the moment the current cursor is in the lower right corner, you can move the cursor around the corners of the block by pressing O,o to toggle four vertices.

Watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqv/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/ Gravity/center

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

(2) input operation  
ctrl +v, go to column block mode, select where you need to add content

Span style= "Color:rgb (73,73,73); Font-family:simsun; font-size:14px; line-height:21px "> Press" I "to enter insert, and then enter"//"(the character you want to enter)

Watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqv/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity /center ">
Then press "ESC" to enter the characters you want to enter in the other lines.

Watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqv/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity /center ">

(3) Copy and pasteCTRL+v, enter the column block mode. Select what you need 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" to enter content in the following column of the cursor. Press "P" to enter content in the preceding column of the cursorPress "P" effect according to the effect of large "p"


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.