How to Use the column editing mode of VIM

Source: Internet
Author: User

How to Use the column editing mode of Vim?

* Windows

I have been using Vim for windows. I have heard that Vim has a column editing mode and has never been used. I tried it several times and failed. Today, I went to the Internet to check my work needs. After continuous attempts, I finally succeeded in using it. Here I will share with you:

1. In command mode, use the following shortcut key: Ctrl + Q, and Q in lower case.

2. Use the hjkl keys to move and select related rows and columns. You can select a block and never use the mouse.

3. if you want to add a text column to the left of the block, select the block, press the uppercase I, and then the cursor automatically goes to the upper left corner of the block. You can enter the content, why don't you think every column is inserted? Don't worry. Press ESC after entering the content. A miracle happens. The same content is added to each line.

4. If you want to delete a block, it is easier to select it and press Del!

More functions are waiting for you to find out. Please leave a message for me!

[Transfer] http://blog.csdn.net/wzhigg/article/details/4367672

 

* Linux

Delete column 1. move the cursor to the position to be operated. 2. Press Ctrl + V to enter the "visible block" mode and select the number of rows to operate on this column. 3. d Delete. Insert column The knowledge about insert operations is slightly different. For example, we insert "()" before each row: 1. the cursor is positioned at the place to be operated. 2. Press Ctrl + V to enter the "visible block" mode and select the number of rows to operate on this column. 3. Shift + I (I) enter the content to be inserted. 4. Press ESC twice to insert content in the selected area of each line.

[Transfer] http://www.cnblogs.com/xiaowant/articles/1992923.html

Delete column 1. move the cursor to the position to be operated. 2. Press Ctrl + V to enter the "visible block" mode and select the number of rows to operate on this column. 3. d Delete. Insert column The knowledge about insert operations is slightly different. For example, we insert "()" before each row: 1. the cursor is positioned at the place to be operated. 2. Press Ctrl + V to enter the "visible block" mode and select the number of rows to operate on this column. 3. Shift + I (I) enter the content to be inserted. 4. Press ESC twice to insert content in the selected area of each line.
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.