Make new vertical/horizontal split in previously existing vertical/horizontal split




if I already have a vertical/horizontal split open and I split another file horizontally or vertically, by default it creates a new split.  I'd like to control this behavior with a keyboard shortcut so the split will go to an existing vertical/horizontal split instead.  

I've attached screenshots show my editor with 3 splits already.  The second screenshot is what happens if I just create a new vertical split (now there are 3).  The third screenshot is the behavior I want so that there are still 2 vertical splits (it just moved to the closest right split).  

1 comment
Comment actions Permalink

You can do it without the mouse using Ctrl-Shift-A to search for action, then entering "spl hor", then do it again, "spl ver". If you want, you can bind each of those actions in your keymapping.


Please sign in to leave a comment.