patch 7.4.1658
Problem: A plugin does not know when VimEnter autocommands were already
triggered.
Solution: Add the v:vim_did_enter variable.
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt
index 4de5b16..5d502f1 100644
--- a/runtime/doc/autocmd.txt
+++ b/runtime/doc/autocmd.txt
@@ -918,7 +918,15 @@
loading .vimrc files, executing the "-c cmd"
arguments, creating all windows and loading
the buffers in them.
- *VimLeave*
+ Just before this event is triggered the
+ |v:vim_did_enter| variable is set, so that you
+ can do: >
+ if v:vim_did_enter
+ call s:init()
+ else
+ au VimEnter * call s:init()
+ endif
+< *VimLeave*
VimLeave Before exiting Vim, just after writing the
.viminfo file. Executed only once, like
VimLeavePre.
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 642f0ad..e174481 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1762,6 +1762,10 @@
version 5.0 and 5.1 may have a patch 123, but these are
completely different.
+ *v:vim_did_enter* *vim_did_enter-variable*
+v:vim_did_enter Zero until most of startup is done. It is set to one just
+ before |VimEnter| autocommands are triggered.
+
*v:warningmsg* *warningmsg-variable*
v:warningmsg Last given warning message. It's allowed to set this variable.