Vim: Split Pane

" open horisontal split on the bottom of the current buffer
:set splitbellow
:set sb
:set nosplitbellow
:set nosb

" open vertical split to the right of the current buffer
:set splitright
:set spr
:set nosplitright
:set nospr
Ctrl-w + Ctrl-v
Ctrl-w + v
:vsplit
:vs
:wincmd v
:winc v
New vertical split.
Ctrl-w + Ctrl-s
Ctrl-w + s
:split
:sp
:wincmd s
:winc s
New horizontal split.
Ctrl-w + Ctrl-w
Ctrl-w + w
Cycle pane.
Ctrl-w + Ctrl-h / j / k / l
Ctrl-w + h / j / k / l
Navigate to left / down / up / right pane.
Ctrl-w + Ctrl-q
Ctrl-w + Ctrl-c
Ctrl-w + c
:close
:clo
Close pane.

Expand vertical split

<ctrl-w> + '>' (expand one line vertical)
:winc >
:vertical res +1
30 + <ctrl-w> + '>' (expand 30 lines vertical)
:30winc >
:vertical res +30
<ctrl-w> + '<' (shrink one line vertical)
:winc <
:vertical res -1
30 + <ctrl-w> + '<' (shrink 30 lines vertical)
:30winc <
:vertical res -30

Expand horizontal split

<ctrl-w> + '+' (expand one line horizontal)
:winc +
:res +1
30 + <ctrl-w> + '+' (expand 30 lines horizontal)
:30winc +
:res +30
<ctrl-w> + '-' (shrink one line horizontal)
:winc -
:res -1
30 + <ctrl-w> + '-' (shrink 30 lines horizontal)
:30winc -
:res -30

Expand maximum, equal

<ctrl-w> + '_' (expand max vertical)
:winc _
<ctrl-w> + '|' (expand max horizontal)
:winc |
<ctrl-w> + '=' (expand equal vertical and horizontal)
:winc =

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *