Is there a way to move vim windows this way?

I have four windows:

| | | | | A | | | |_________| C | D | | B | | | | | | | 

So how can I change them this way?

 | | | | A | C | |_________|______| | B | D | | | | 

 ctrl+W/J/K/L 

the thing always moves the window to the other side, I can not use them for this. Thanks!

+4
source share
1 answer

I can think of two steps:

  • move the cursor to C , press CW c to close the window
  • move the cursor to D , press :sp #<enter>

The idea is to close one window (buffer) and reopen it in the right place (by sp or vs).

Glad to know if there is an easier way.

+5
source

Source: https://habr.com/ru/post/1493063/


All Articles