Vim use (b): frequently used functions

Source: Internet
Author: User

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

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.