How to split the vim window

Source: Internet
Author: User
When viewing a program, you often need to view two files at the same time. Also supported in vim

The following is vim's command for window separation:(The following command is in the last line)
1. horizontal window division:
: Split (enable another window to view the same file)
: Split file name (enable another window to view the specified file)
2. vertical window separation:
: Vsplit (enable another window to view the same file)
: Vsplit file name (enable another window to view the specified file)
3. switch between Windows:
Cntl + w: Press the cntl key twice at the same time. Switch from one window to another (usually two windows will be opened, and it will appear messy when there is more, so remember this switch command to think it is enough ?)
4. increase or decrease the window size:
Cntl + w, +/-: Press the cntl key and w (this combination should be the start sign of the command), and then press + (increase the window) or-(reduce the window) (at this time, do not press the cntl key ).
5. close the current file:
1) switch the cursor to the current window, and close the window according to the method of closing a single window. For example, q command.
2) close all window files: Add all to all the commands that close a single window, for example, qall.
3) close all files except the current window. : Only.
If you want to score, you can score it!

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.