This is probably just a bandaid for a greater problem, but I had the following code for MacVim (GUI mode) in my .vimrc
autocmd GUIEnter * winpos 100 50
The problem is it's not working properly on startup, yet if I run winpos
even 1 second after it starts it works perfect.
The GUIEnter
command seems to be correct from all I read, and it's still doing GUI stuff after this obviously, because it keeps moving the window just a bit from where I want it.
Is it possible as a hacky workaround to let MacVim load completely, wait 200ms and then execute the winpos
command?
sleep
(:h :sleep
) but you said so: the problem is probably elsewhere.:help GUIEnter
saysIt is triggered before VimEnter when using gvim.
, you should giveVimEnter
a try. And maybe alsoFocusGained
sleep
wont work because it prevents Vim from loading in the first place like its frozenFocusGained
andVimEnter
as well but no dice :(