Vim split screen function Summary

Source: Internet
Author: User

Vim split screen function

To sum up, ctrl + w and a key letter are used to trigger a function.
(1) open several files in shell and split the screen:
Vim-On file1 file2...
Vim-on file1 file2...

Large O represents vertical, and small o Represents horizontal Split (horizontal by default). n represents several screens. In fact, I don't think I need to write it, by default, several screens are split based on the number of files to be split.
(2) open a split screen in vim:
Create a blank split screen:
: New
Open any file:
: Vsplit (: vsp) filename
: Sp (split) filename
Open the current file:
Ctrl + w and s (split)
Ctrl + w and v (vsplit)

(3) close a split screen:
: Only or ctrl + w and o cancel other split screens, only keep the current split screen
Ctrl + w and c (close)
Only the last split screen is available:
Ctrl + w and q (quit)
(4) move the cursor, that is, switch the split screen. You can also move the split screen, for example, move the left split screen to the right.
Ctrl + w and w (various switches are convenient only when there are two split screens)
Ctrl + w and h (H) left
Ctrl + w and j (J)
Ctrl + w and k (K)
Ctrl + w and l (L) Right
(5) The last step is to change the split screen size.
Ctrl + w and <left
Ctrl + w and> right
Ctrl + w and +
Ctrl + w and-bottom
Ctrl + w and = restore equality

 

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.