Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing the size of the split screen in vimdiff

Tags:

vim

I only know two commands for dealing with vimdiff:

Ctrl-w Ctrl-w switches windows and Ctrl-w = makes the two windows equal width if they became uneven due to, for example, resizing the terminal.

How can I make the left screen much larger than the right, for instance?

like image 966
John Baber-Lucero Avatar asked Aug 21 '12 16:08

John Baber-Lucero


1 Answers

You can use any windowing command in vimdiff, for example CTRL-w < to make the left window one column smaller. This can also be combined with a count, for example CTRL-W 5> to make the right window 5 columns smaller. Consult the help page with :help CTRL-w to get a list of window commands.

Additionally, you can use the mouse to change the size of the windows by clicking the boundary between both windows and dragging it into a direction. You might have to enable mouse support by issuing :set mouse=a first.

like image 198
hochl Avatar answered Sep 25 '22 07:09

hochl