Execute an autocommand only once
- by Andrej M.
I have an issue with using GVim on Windows. I have set up the following in my .vimrc:
if has("gui_running")
autocmd VIMEnter * :source C:/session.vim
endif
Unfortunately this creates a problem. If I'm a the top of the file and try to move up a line (k), the screen flashes. If I hold the key for just a second it will flash a few dozen times, it is really nasty too look at.
I've tried using GUIEnter instead but I got the same results. The docs mention that I can fire an autocommand only once, but I couldn't figure out the exact syntax. Care to help?