Search code examples
vim

Vim vertical resize shortcut


I would like to set a shortcut to resize the width of two panes:

:vertical resize +2

I would like to map this to [option] + (in other words, shift + option + "+). I am on a mac. I tried doing the following. How would I add in this shortcut for a nnoremap ?


Solution

  • you can do this without having to switch to the ex command line:

    To change vertical height:

    [n] --> ctrl + w --> [+ | -]
    

    And horizontal:

    [n] --> ctrl + w --> [< | >]