comparison runtime/doc/autocmd.txt @ 8738:e770986c855a v7.4.1658

commit https://github.com/vim/vim/commit/1473551a4457d4920b235eeeb9f279e196ee7225 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Mar 26 21:00:08 2016 +0100 patch 7.4.1658 Problem: A plugin does not know when VimEnter autocommands were already triggered. Solution: Add the v:vim_did_enter variable.
author Christian Brabandt <cb@256bit.org>
date Sat, 26 Mar 2016 21:15:05 +0100
parents aea5ebf352c4
children b1a19a2f73f0
comparison
equal deleted inserted replaced
8737:b3a380af91fb 8738:e770986c855a
916 *VimEnter* 916 *VimEnter*
917 VimEnter After doing all the startup stuff, including 917 VimEnter After doing all the startup stuff, including
918 loading .vimrc files, executing the "-c cmd" 918 loading .vimrc files, executing the "-c cmd"
919 arguments, creating all windows and loading 919 arguments, creating all windows and loading
920 the buffers in them. 920 the buffers in them.
921 *VimLeave* 921 Just before this event is triggered the
922 |v:vim_did_enter| variable is set, so that you
923 can do: >
924 if v:vim_did_enter
925 call s:init()
926 else
927 au VimEnter * call s:init()
928 endif
929 < *VimLeave*
922 VimLeave Before exiting Vim, just after writing the 930 VimLeave Before exiting Vim, just after writing the
923 .viminfo file. Executed only once, like 931 .viminfo file. Executed only once, like
924 VimLeavePre. 932 VimLeavePre.
925 To detect an abnormal exit use |v:dying|. 933 To detect an abnormal exit use |v:dying|.
926 When v:dying is 2 or more this event is not 934 When v:dying is 2 or more this event is not