How do I incrementally grow or shrink a split window by a specific number of lines or columns?
Answer
:resize +N / :resize -N
Explanation
:resize adjusts the height of the current window by a relative or absolute amount. Using +N or -N grows or shrinks it incrementally — letting you fine-tune split sizes precisely without reaching for the mouse or recalculating total dimensions.
How it works
:resize +N— increase the current window height byNlines:resize -N— decrease the current window height byNlines:resize N(no sign) — set height to exactlyNlines:vertical resize +N— increase width byNcolumns (for vertical splits):vertical resize -N— decrease width byNcolumns- Keyboard shortcuts in Normal mode:
<C-w>+— increase height by 1 line<C-w>-— decrease height by 1 line<C-w>>— increase width by 1 column<C-w><— decrease width by 1 column{count}<C-w>+— increase height by{count}lines
Example
You have a small preview split at the bottom and want to make it taller:
:resize +10
Or use the keyboard shortcut: 5<C-w>+ to add 5 lines at once.
For a vertical split that feels too narrow:
:vertical resize +20
Tips
:resize 0shrinks the window to its minimum (just the status bar)<C-w>=equalizes all windows back to equal sizes if your layout gets messy- Map resize shortcuts for faster access:
nnoremap <silent> <Right> :vertical resize +2<CR> nnoremap <silent> <Left> :vertical resize -2<CR> nnoremap <silent> <Up> :resize +2<CR> nnoremap <silent> <Down> :resize -2<CR>