Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do you increase or decrease the height or width of a vim buffer in a way so that when you hold down the key combo, the buffer size constantly changes?

I know CTRL W < works but it moves it one unit at a time. I am looking for a way that when you do CTRL W < and hold down the < that VIM changes the buffer's width fluidly(constantly) until you let go of the <.

share|improve this question
You could use . to repeat the last action. – Phoshi Dec 6 '10 at 20:22
@Phoshi: I think that's just for editing actions. In fact, help . says "Does not repeat a command-line command." – Dennis Williamson Dec 6 '10 at 21:22
@Dennis; Oh, looks like you're right, my apologies! – Phoshi Dec 6 '10 at 22:08
or could you CTRL W any_number < – elmonkeylp Mar 27 '15 at 21:14
up vote 5 down vote accepted

Try these:

:nmap ^[> :vertical res +1^M
:nmap ^[< :vertical res -1^M

To input the ^[, press Ctrl-v then Esc. To input the ^[, press Ctrl-v then Enter.

Now you can hold down Alt-Shift-> to smoothly increase the width or Alt-Shift-< to smoothly increase it. It feels kind of weird using it in the right-hand window to me, because I think that I'm moving the separator left and right, but that's not what's happening.

For changing the size of horizontally split windows:

:nmap ^[+ :res +1^M
:nmap ^[- :res -1^M
share|improve this answer
You may use the string <esc> (with the angle brackets) in place of hard-coding escape characters. – Heptite Dec 6 '10 at 23:10

You can also use 10 ctrl-w < or 10 ctrl-w > to change it by 10 units.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.