3

In vim I currently have this window arrangement

+----------------------------+
|                            |
|             1              |
+----------------------------+
|                            |
|             2              |
+----------------------------+
|                            |
|             3              |
+----------------------------+

This is what I want:

+-------------+--------------+
|             |              |
|             |              |
|    1        |      2       |
|             |              |
|             |              +
+-------------+--------------+
|                            |
|             3              |
+----------------------------+

How can I do that?

If I focus on 1 - then try to convert the 1 & 2 horizontal split to vertical with <C-w>H I end up with this

+------+------+
|      |      |
|      |   2  |
|  1   +------+
|      |      |
|      |   3  |
+------+------+
4

With the windows arranged as in you last illustration, move the cursor to window 3 and type <C-W>J.

1
  • 1
    cool, thanks. I see from :h ctrl-w_j this is pretty much a command for exactly that! i.e. Move the current window to be at the very bottom, using the full width of the screen. This works like closing the current window and then creating another one with ":botright split", except that the current window contents is used for the new window. Nov 22 '15 at 18:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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