Vim's window switch

Source: Internet
Author: User

When using vim to write code, I like to look at the definition of the structure in the header file while writing the implementation code, so that it is often used in multiple windows to edit, view the document.

1. Open multiple files at the same time and arrange horizontally

Vim-o t.c T.h

2, open multiple files at the same time after the vertical arrangement, if you do not use the parameter O, you can open the file after the operation

vim t.c t.h:all    // Horizontal or: Vertical     All // Portrait

3, the same file partition window. If there is a very long file (thousands of lines:)), you want to look at the front, to write the back, you need to use this

#在文件内: Split or: SP

4. Close the window

#关闭当前窗口: close# Keep the current window, close other windows: only

5. After opening a file, you want to open another file

#横向打开一个文件: SP file name # Portrait Opens a file: Vsplit (VSP) file name # Open a new window, note that this is not visible: New file Name # portrait opens it: Vnew file name

6. Jump between windows

CTRL +W J Move Down CTRL+W k up Move Ctrl+ whMove Ctrl + W L to the  rightMove Ctrl +W t move to top CTRL +w b moving to the end

7. Mobile Window

#移动到最上面ctrl+w shift+k# move to the bottom ctrl+w shift+J # move to the leftmost ctrl+w shift+ h#move to the rightmost CTRL +w Shift+l

Vim's window switch

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.