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.