Vim buffer and window operations, vim window

Source: Internet
Author: User

Vim buffer and window operations, vim window

############# Buffer zone

: E (: open) open the New Buffer

: Ls (: buffers) list all buffers in the list
/Bs/bv/be (BurExplore shortcut)

: Buffer 2 switch buffer
: Bnext/bn (Ctrl 6) Next Buffer
: Bprevious/bp top Buffer
: Bfirst/bf first Buffer
: Blast/bl last Buffer

: Sbuffer 3 open the buffer 3 in a new window

: Bdelete 4 move the buffer outside the list
: Bwipeout 4 disable the buffer

############ Window
: Split (open down)
: Vsplit (with window opened)

(Double Ctrl W) switching window in turn

Ctrl-W h move to the left window

Ctrl-W j move to the following window

Ctrl-W k move to the upper window

Ctrl-W l move to the right window

: Q close the window (exit the Program)


Vim window operation commands

CTRL-W j moves the cursor down N windows. The position of the optical indicator is selected between several windows.

CTRL-W k moves the cursor up N windows. The position of the optical indicator is selected between several windows.

CTRL-W h move the cursor to the left N windows. The position of the optical indicator is selected between several windows.

CTRL-W l move the cursor N windows to the right. The position of the optical indicator is selected between several windows.

CTRL-W w moves the cursor to the window at the right/Bottom of the current window if no count is added. If
If there is no window at the right/bottom, it will be moved to the window in the upper left corner.

CTRL-W W moves the cursor to the window at the left/top of the current window if no count is added. For example
If there is no window at the left or top, the window will be moved to the lower right corner.

CTRL-W t moves the cursor to the window in the upper left corner.

CTRL-W B moves the cursor to the lower right corner of the window.

The CTRL-W p moves to the previous (previous) window.

The CTRL-W P moves to the preview window. If no preview window exists, an error occurs.

In addition, the command mode can also be used to replace the CTRL-W with: wincmd
For example, wincmd j moves the cursor to the window below.

Can: h wincmd to view help documentation

Vim disable the buffer

This is the generated backup file for data security considerations. You can add the set nobackup line to the. vimrc configuration file.

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.