1. Common Vim Functions
Common functions of VIM, including block selection, copying, multi-file editing, and multi-window functions.
2. Vim Block Selection
Block Selection is to copy and paste one part of the document without the entire line of processing. Press V, V, CTRL + V to select the block. Appears in the lower left corner
-- Visual line --
V: select the character, and select "V" for the reversed area of the cursor. Select "Ctrl + V" for the entire line after the cursor. Select "Y" for the rectangle: copy the Selected Location D: Delete the selected location
Copy the data copied by Y, find the appropriate position, and paste it by P.
3. Multi-file editing
Multi-file editing allows Vim to open multiple files at a time. These files can be easily copied and pasted. Otherwise, if two Vim files are used, they can only be copied and pasted with the mouse. Open multiple files:
Vim test1 Test2
: N: Edit next file: N: Edit last file: Files: list all files opened by VIM
$ Vim test test1: Files 1% A = "test" Line 1 2 # "test1" line 24yy # copy 4 rows: N # Open another file P # paste: Q! # Exit
4. Multiple windows
Vim's multi-window display allows you to conveniently display multiple files. You can copy and paste the data in two windows in YY mode. : SP [filename]: open a new window. filename can be blank. If it is empty, open the current file Ctrl + W + J: Move the window below. Press Ctrl + W to open it first, then J or press Ctrl + W + K: Move the top window Ctrl + W + Q: exit the file, the same as Q
Address: http://blog.csdn.net/yonggang7/article/details/38455105