r-_mkw
Last Updated: June 24, 2016
·
128
· ryrych
Wojtek medium

Vim panes resizing

vim

You can maximize panes

  • Horizontally with <kbd>Ctrl w |</kbd>
  • Vertically with <kbd>Ctrl w _</kbd>

To make all panes equal type <kbd>Ctrl w =</kbd>. As resizing is a frequent
action, you can consider following mappings:

nnoremap <silent><Leader>+ :exe "resize " . (winheight(0) * 3/2)<CR>
nnoremap <silent><Leader>- :exe "resize " . (winheight(0) * 2/3)<CR>
nnoremap <silent><Leader>> :exe "vertical resize " . (winwidth(0) * 3/2)<CR>
nnoremap <silent><Leader>< :exe "vertical resize " . (winwidth(0) * 2/3)<CR>

Source

For maximizing and restoring the current window I suggest you trying vim-maximizer which toggles the current pane size with <kbd>F3</kbd>.

Say Thanks
Respond
Filed Under