Vim's split-screen function commands Daquan _linux

Source: Internet
Author: User


Split-screen start vim

Use the uppercase O parameter to split the screen vertically.

vim-on file1 file2 ...

Use the lowercase o parameter to horizontally split the screen

vim-on file1 file2 ...

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

Turn off the split screen

Close the current window

Ctrl+w C

Closes the current window, and if only the last one is left, then quit VIM

CTRL+W Q

Split screen

Splits the currently open file up and down.

Ctrl+w s

Split up and down, and open a new file

: SP filename

Split the currently open file

Ctrl+w V

Split right and left, 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 click the Ctrl+w

Move the cursor to the right screen

Ctrl+w L

Move the cursor to the left side of the screen.

Ctrl+w h

Move the cursor to the top screen.

Ctrl+w K

Move the cursor to the bottom screen.

Ctrl+w J

Move the cursor to the next screen ...

Ctrl+w W

Move the split screen

This feature uses Vim's cursor key, but it's all uppercase. Of course, if your split screen is very messy and complex, there may be some very strange symptoms of this function.

Move to the right.

Ctrl+w L

Move left

Ctrl+w H

Move Up

Ctrl+w K

Move Down

Ctrl+w J

Screen size

Here are some actions to change the size, mainly the height, you can use [ctrl+w] or [ctrl+w] for width, but this may require the latest version to support.
Make all the screens have the same height.

Ctrl+w =

Increase the height.

Ctrl+w +

Reduce the height.

Ctrl+w-

Summarize

The above is the entire content of this article, I hope the content of this article for everyone's study or work can help, if there is doubt you can message exchange.

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.