1. Vim often uses functions
Vim's regular use function. Contains the selection of blocks. Copy, multi-file editing. Multi-form and other functions.
2. Vim Block Selection
Block selection is the ability to select a piece of the document to be copied, pasted, without the entire line of processing. Press V, v. Ctrl + V when entering block selection. Appears in the lower left corner
--VISUAL line--
V: Character selection, where the cursor passes the inverse white selection V: Line selection. The entire line of the cursor through the inverse of the white selection Ctrl + V: Block selection, rectangular way Select y: Copy the selected place D: Delete the selected place
Copy the data to Y and locate the appropriate position by P to paste.
3. Multi-file editing
Multi-file editing is vim to open multiple files at once, these files can be easily copied, pasted. Otherwise use two Vim words, can only use mouse to copy. Paste. To open multiple files:
Vim Test1 Test2
: N: Editing the next file: N: Editing the last file: Files: List all the files that vim opens
$ vim Test test1:files 1%a= "test" line 1 2 # "test1" line 24yy #复制4行: N #打开还有一个文件p #粘贴: q! #退出
4. Multiple forms
Vim multi-form display is convenient to display multiple files, two forms of data can be yy copy, paste. : SP [filename]: Opens a new form, filename can be empty. Open the current file for null Ctrl+w+j: Move the form below. Press Ctrl+w to release first, then J or ↓ Ctrl+w+k: Move above form ctrl+w+q: Exit file, same as: Q
Address: http://blog.csdn.net/yonggang7/article/details/38455105
Vim use (b): frequently used functions