When using :vsplit my gvim window jumps to a specific screen location. How do I stop this from happening?

Same thing happens when the second to last split is closed.

I'm using gvim on Windows.

1 Answer 1


This happens because when vertical splitting the window, vim needs to add a vertical scrollbar, which causes vim to recalculate the visual size and eventually makes vim jump to a different screen location. The current workaround is to :set guioptions-=r guioptions-=L


As of patch 8.0.1278, you can also use :set guioptions+=k to prevent Vim from resizing, see also the documentation at :help 'go-k'

  • 2
    Thank you, works great! guioptions-=L seems to be enough for me, I might not have covered all cases though. For anyone wondering :set guioptions-=r removes the right hand side scrollbar and guioptions-=L removes the left one, which appears when using :vsplit. Feb 3, 2016 at 14:33

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.