With Vsplit, I always wish the new file would open on the last half of the vim session instead of the first. I can manually do c-w and c-r to switch them but I would rather have this automatic when I run vsplit foo.js.

Any ideas how to make this automatic where the file opens on the right side of the screen?


Put the following in your vimrc:

set splitright

Read :h splitright for more information.

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.