Vim-Multi-File Operations

Source: Internet
Author: User
Multi-File Operations
Vim supports multi-file operations, including two methods:

1. open multiple files at the same time. In normal mode, enter:

: E → open a new file. The current file must be saved.
: Buffers → list all open files in current vim.
: Ls → equivalent to: buffers, which lists all opened files in current vim.
: BN → switch to the next file.
: BP → switch to the previous file.
: BD → close the file.
: B (Num) → switch to the file whose serial number is num. The serial number is obtained by the LS command.
GF → open the file name at the cursor.

2. Split the screen. In normal mode, enter:

: Vsplit → create a vertical split screen. You can directly enter the file name you want to edit, for example, vspilt filename.txt.
: Split → create a horizontal split screen.

For detailed split screen operations, refer to here.

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.