John Baber-Lucero
John Baber-Lucero

Reputation: 2652

Changing the size of the split screen in vimdiff

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?

Upvotes: 36

Views: 18508

Answers (1)

hochl
hochl

Reputation: 12960

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.

Upvotes: 54

Related Questions