Vim split Screen

Source: Internet
Author: User

Split screen start vim
    1. Use the uppercase O parameter to split the screen vertically.
      vim -On file1 file2 ...
    2. Use the lowercase o parameter to split the screen horizontally.
      vim -on file1 file2 ...

Note: N is a number that is divided into several screens.

Turn off split screen
    1. Closes the current window.
      Ctrl+W c
    2. Closes the current window, leaving vim if only the last one is left.
      Ctrl+W q
Split screen
    1. Splits the currently open file up and down.
      Ctrl+W s
    2. Split up and down and open a new file.
      :sp filename
    3. Splits the currently open file left and right.
      Ctrl+W v
    4. Split left and right, and open a new file.
      : VSP filename
Move cursor

VI in the cursor key is H, J, K, L, to switch between the various screens, only need to first click Ctrl+w

    1. Move the cursor to the right screen.
      Ctrl+W l
    2. Move the cursor to the left screen.
      Ctrl+W h
    3. Move the cursor over the top screen.
      Ctrl+W k
    4. Move the cursor to the bottom screen.
      Ctrl+W j
    5. Move the cursor to the next screen.
      Ctrl+w W
Mobile split Screen

This feature also uses VIM's cursor keys, but it's all capitalized. Of course, if your split screen is very messy and complicated, this feature may have some very strange symptoms.

    1. Move right.
      Ctrl+W L
    2. Move left
      Ctrl+W H
    3. Move Up
      Ctrl+W K
    4. Move Down
      Ctrl+W J
Screen size

Here are some of the things that change the size, mostly height, you can use Ctrl+w < or for width, but this may require the latest version to support.

    1. Let all the screens have the same height.
      Ctrl+W =
    2. Increase the height.
      Ctrl+W +
    3. Reduce height.
      Ctrl+W -

Vim split Screen

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.