1

When I split my window (C-w v), is it possible to have the cursor automatically go to the new split right away?

(I looked up switchbuf but I think that's something else; having to do with buffers rather than windows?)

  • Ctrl-W N does move the cursor to the newly opened window (where a new buffer exists). Ctrl-W V is a slightly different animal. Besides doing vertical split instead of horizontal it uses the same buffer as the one you ran the command from. Under most circumstances it doesn't seem like it matters whether you're in the new window or the current window since the contents are identical. You sure you don't mean the vertical equivalent of Ctrl-W N? Just want to be sure. – B Layer Nov 3 '19 at 7:17
  • @BLayer you're absolutely right. I wrote my question absent-mindedly; it only happens when splitting.. and while it may not technically matter, I find it annoying every time. – Harv Nov 3 '19 at 9:33
2

When I split my window (C-w v), is it possible to have the cursor automatically go to the new split right away?

In fact, you do move to the newly created window. The point is that it's opened on the left side by default.

So you need to set splitright. Be aware though, this option affects all vertical split commands, not only :vsplit.

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.