Use of Multiple labels and multiple windows in VIM

Source: Internet
Author: User

When editing with vim, it is often difficult to edit multiple files or to edit a file by referring to other files. Here are two methods:

1. Multiple tags

Enter:

Name of the vim-P file to be edited

For example, VIM-p * is used to edit all files in the current directory.

Switch between multiple tags to the right when switching GT, switch to the left with GT

To add a label during editing, you can: tabnew filename.

: Tabc close the current tab
: Tabo: Close all other tabs.
: Tabs view all open tabs
: Previous TABP
: The last one of tabn

 

To close and save all files, you can: wqall

 

2. Multiple windows

The window can be water and vertical. The horizontal mode is used for editing, and the vertical mode is vsplit filename.

To switch between windows, run Ctrl + W.

Close the command.

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.