Windows – Plugins cause gVim window to move (become “unsnapped”) in Windows

aero-snapgvimvimvim-pluginswindows 7

I have a couple of Vim plugins that seem to cause aero-snapped windows in Windows 7 (Aero windows, not Vim windows) to pop out of their "snapped" position when certain events occur. I don't know enough about the internals of Vim to make much of an educated guess about exactly what causes the problem, but this seems to happen when a plugin opens a new Vim-window or other graphical element for text outside of the actual buffer window. (I hope that makes sense; my Vim terminology probably isn't correct.)

The two operations I see that cause this most regularly are:

  • Opening the Gundo history-tree window with F5
  • Opening the Pymode completion-menu by typing .

I have tried turning on both winfixheight and winfixwidth, but I am still seeing this issue.

Any ideas what's causing this and whether it's fixable?

Best Answer

As I don't know about the concept of snapped windows within Vim, I assume you mean the positioning of other application windows next to (G)VIM. I suspect this happens when the size of Vim itself changes.

As you hint at a possible connection with Vim window splits, it might be caused by a vertical split, which in the default configuration causes an additional scrollbar (on the left side) to appear, and that increases the width of Vim's application window. You can avoid that via

:set guioptions-=L
Related Question