The following table lists common commands for controlling windows in vim. See also the split, vsplit, and resize commands in the Alphabetical Summary of ex Commands in Alphabetical Summary of ex Commands. For brevity, control characters are marked in the following list by ^.
Open a new window.
Open file in a new window.
Split the current window. With file, edit that file in the new window.
Same as :sp, but make new window read-only.
Edit next file in file list in new window.
Like :sp, but split vertically instead of horizontally.
Close current window.
Hide current window, unless it is the only visible window.
Make current window the only visible one.
Resize window to num lines.
Write all changed buffers to file.
Close all buffers and exit.
Same as :sp.
Same as :new.
Open new window with alternate (previously edited) file.
Same as :clo.
Same as :only.
^W j, ^W k
Move cursor to next/previous window.
Move cursor to previous window.
^W h, ^W l
Move cursor to window on left/right.
^W t, ^W b
Move cursor to window on top/bottom of screen.
^W K, ^W B
Move current window to top/bottom of screen.
^W H, ^W L
Move current window to far left/right of screen.
^W r, ^W R
Rotate windows down/up.
^W +, ^W -
Increase/decrease current window size.
Make all windows same height.