window

Ctrl-W

Ctrl-W is the prefix for every window-management command. Follow it with h/j/k/l to move between splits, with =/_/| to resize, or with c/o to close windows.

<C-w>{key}  (normal mode)

Variations

Keystroke Effect
<C-w>h/j/k/l Move cursor to the split in that direction
<C-w>w Cycle to the next window
<C-w>= Equalize all window sizes
<C-w>o Close every window except the current one
<C-w>c Close the current window
<C-w>_ / <C-w>| Maximize the current window vertically / horizontally

Examples

<C-w>l

Jump to the split to the right

<C-w>o

Turn a busy layout back into a single window

10<C-w>>

Widen the current window by 10 columns

Gotcha

Ctrl-W in INSERT mode deletes the previous word — not a window command. Escape first.

Related

← All Vim commands · Vim cheat sheet