Vim split screen

Source: Internet
Author: User

1. Split the screen to start Vim

Use the uppercase o parameter to split the screen vertically. Vim-on file1 file2... use the lower-case o parameter to split the screen horizontally. Vim-on file1 file2...Note:N is a number, which indicates several screens.

2. Disable Split screen

Close the current window. CTRL + w c (press Ctrl + W first, then press C) to close the current window. If only the last one is left, exit vim. CTRL + w Q

3. Split screen

Splits open files up and down. CTRL + w s split up and down, and open a new file. : SP filename: splits open files left and right. Press Ctrl + w v to separate and open a new file. : VSP filename

4. move the cursor

The cursor keys in VI are H, J, K, and L. to switch between screens, just press Ctrl + W to move the cursor to the right screen. CTRL + w l move the cursor to the screen on the left. CTRL + w h move the cursor to the screen above. CTRL + w k move the cursor to the screen below. CTRL + w j move the cursor to the next screen .. CTRL + W

5. Move the split screen

This function still uses the vim optical key, which is only in uppercase. Of course, if your split screen is messy and complicated, this function may have some very strange symptoms. Move to the right. CTRL + w l move Ctrl + w h move Ctrl + w k move Ctrl + w j

6. Screen Size

The following are some operations to change the size, mainly the height. You can use Ctrl + W <or> for the width, but this may be supported by the latest version. Make all screens have the same height. CTRL + W = increase the height. CTRL + W + reduce the height. CTRL + w-
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.