tags:

views:

247

answers:

2

Basically, I want to go from 1) to 2) I usually do this by splitting horizontally first and then vertically, but as I want this to do three-way diffs, it is much handier to start vim by running:

$ vimdiff file1 file2 file3

And then doing something to open the split window below.

1)
    +----+----+----+
    ¦    ¦    ¦    ¦
    ¦ f1 ¦ f2 ¦ f3 ¦
    ¦    ¦    ¦    ¦
    +----+----+----+

2)
    +----+----+----+
    ¦    ¦    ¦    ¦
    ¦ f1 ¦ f2 ¦ f3 ¦
    +----+----+----+
    ¦      f4      ¦
    +--------------+

Does anyone know of a way to this?

+11  A: 

use :botright split or :bo sp, it does what you want

Hasturkun
It does, indeed. Thanks for the quick answer!
Jacobo de Vera
Happy to help, if this works for you, please accept the answer
Hasturkun
+4  A: 

In addition to Hasturkun's excellent answer, you may find some of the Ctrl-W commands quite useful:

These are Ctrl-W followed by (capital) H, J, K or L. These move the current window to the extreme left, bottom, top or right respectively. So to go from your 1 to 2, as an alternative to using :botright, you could do a normal :sp or :vsp and then do Ctrl-W J and the window will be moved to the bottom.

:help CTRL-W_H
:help CTRL-W_J
:help CTRL-W_K
:help CTRL-W_L
Al