links: 010 Vim MOC
Creating splits in vim
Create a vertical split
<CTRL>-W v - this will create a vertical split with the current file
Create a horizontal split
<CTRL>-W s - this will create a horizontal split with the current file
Resizing
Vertical Resizing
<CTRL>-w - Decrease current window height by N (default 1).
<CTRL>-w + Increase current window height by N (default 1).
Explanation:
- In Command mode, press a number
Nthen pressCTRL+Wthen press-or+to resize the window byNrows. - Or just press
CTRL+Wand then press-or+to resize the window by 1 row.
Or you can type :res +/-N. Like :res +10
Horizontal resizing
<CTRL>-w < Decrease current window width by N (default 1).
<CTRL>-w > Increase current window width by N (default 1).
Explanation:
- In command mode, press a number
Nthen pressCTRL+Wthen press<or>to resize the window byNcolumns. - Or just press
CTRL+Wand then press<or>to resize the window by 1 column.
Or, you can type :vertical res +/-N. Like :vertical res +10