I am using Vim and GVim on a Win32 platform (alas, Windows is against my nature, but it’s a work machine). I have noticed in GVim that when it returns to focus (either using the mouse, or via ALT+TAB) there is a brief lag of 2-3 seconds before the cursor resumes flashing and it becomes usable. I definitely do not experience this in when running Vim from the console. I have not it experienced on Linux boxes either, but then I do not edit such long files on my home machine.
Previously I also experienced the slow behaviour when switching between splits within a GVim session (using <c-w><c-w>). Some of the files I edit can be very long, and I have a custom statusline which requires some processing, and GVim was apparently recalculating the highlighting, folding and statusline every time. I was able to avoid that by setting
set eventignore=BufEnter,WinEnter,BufWinEnter
But I still have the problems when the GVim window itself regains focus. Adding set eventignore+=FocusGained makes no difference. Is there any way to persuade GVim to return to focus more smoothly?
Thanks for your help.
I’m guessing you have any of the following lines on a network drive (in a corporate environment, the Home drive (My Documents etc.) is frequently on a fileserver…
:se noswapto disable,:se directory="C:\blabla"to relocate)undofile(:se noundofileto disable,:se undodir="C:\blabla"to relocate)I explicitely moved all of these files to a local folder on my Win32 setup. (Hey, I’m also the guy known to mutilate the virus checker enough to disable on-access scanning just to speed things up a little).