Vi/vim Multi-window editing related commands

Source: Internet
Author: User

1, vi Multi-window editing command: vi-o file1 file2

Display multiple files vertically, inter-window shortcut key:ctrl+w(need to press two times W)

Save and exit all windows:WQA

Exit all windows:QA

650) this.width=650; "title=" Vi.png "alt=" wkiom1md7z-soritaaaxojtcivu862.png-wh_50 "src=" https://s5.51cto.com/ Wyfs02/m01/9d/ae/wkiom1md7z-soritaaaxojtcivu862.png-wh_500x0-wm_3-wmp_4-s_3348943625.png "/>


2. Vim Multi-window editing

Vim can use Parameters large O and small o

vim-o file1 file2 with VI portrait display

650) this.width=650; "title=" Vimo.png "alt=" wkiom1md77wa4kl5aaaxdfk8fh0408.png-wh_50 "src=" https://s2.51cto.com/ Wyfs02/m00/9d/ae/wkiom1md77wa4kl5aaaxdfk8fh0408.png-wh_500x0-wm_3-wmp_4-s_2645801131.png "/>


vim-o file1 file2 Horizontal Display

650) this.width=650; "title=" Vim-o.png "alt=" wkiol1md7_-ymcnnaaa5nhfdyp0248.png-wh_50 "src=" https://s2.51cto.com/ Wyfs02/m02/9d/ae/wkiol1md7_-ymcnnaaa5nhfdyp0248.png-wh_500x0-wm_3-wmp_4-s_4293052699.png "/>

Toggle between Windows shortcut keys with Vi:ctrl+w (press two W)

However, vim multiple windows can be executed on the current window to close the command : BD


If Vim does not add parameters, it opens multiple files directly.

such as vim file1 file2 file3

You can use commands to switch between files : bn, for example: B2 switch to the second file: B3 switch to a third file

Save and exit all windows:WQA

Exit all windows: QA


Summary comparison:

650) this.width=650; "title=" Db.png "alt=" wkiom1md8ltrantbaaaqn3oauqm852.png-wh_50 "src=" https://s3.51cto.com/ Wyfs02/m01/9d/af/wkiom1md8ltrantbaaaqn3oauqm852.png-wh_500x0-wm_3-wmp_4-s_1268572321.png "/>


This article is from the "Just for Fun" blog, so be sure to keep this source http://linuxmz.blog.51cto.com/9860985/1953554

Vi/vim Multi-window editing related commands

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.