Auto-Installation and source $Myvimrc doesn't work the same time
- Dominant language
- Vim Script
- Stars
- 35.8k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
Explain the problem here ...
I saw your script in tips and extras wiki page, it can auto update missing plugin and source $myvimrc after it. But it still have a buffer after that. So I decided to put the quit command to it.
```
" Run PlugInstall if there are missing plugins
autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
\| PlugInstall --sync | q | source $myvimrc
\| endif
```

In the video, the script can auto install, and quit the buffer, but it didn't source myvimrc because the status line is disappear.
------------------------------
```
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled May 2 2021 19:00:02)
MS-Windows 32-bit GUI version with OLE support
Included patches: 1-2824
Compiled by mool@tororo
Huge version with GUI. Features included (+) or not (-):
+acl +cmdline_hist +eval +jumplist +multi_byte_ime/dyn +python3/dyn -tag_old_static +virtualedit
+arabic +cmdline_info +ex_extra +keymap +multi_lang +quickfix -tag_any_white +visual
+autocmd +comments +extra_search +lambda +mzscheme/dyn +reltime +tcl/dyn +visualextra
+autochdir +conceal -farsi +langmap +netbeans_intg +rightleft -termguicolors +viminfo
+autoservername +cryptv +file_in_path +libcall +num64 +ruby/dyn +terminal +vreplace
+balloon_eval +cscope +find_in_path +linebreak +ole +scrollbind -termresponse -vtp
-balloon_eval_term +cursorbind +float +lispindent +packages +signs +textobjects +wildignore
+browse +cursorshape +folding +listcmds +path_extra +smartindent +textprop +wildmenu
++builtin_terms +dialog_con_gui -footer +localmap +perl/dyn +sound -tgetent +windows
+byte_offset +diff +gettext/dyn +lua/dyn +persistent_undo +spell +timers +writebackup
+channel +digraphs -hangul_input +menu +popupwin +startuptime +title -xfontset
+cindent +directx +iconv/dyn +mksession -postscript +statusline +toolbar -xim
+clientserver -dnd +insert_expand +modify_fname +printer -sun_workshop +user_commands +xpm_w32
+clipboard -ebcdic +ipv6 +mouse +profile +syntax +vartabs -xterm_save
+cmdline_compl +emacs_tags +job +mouseshape +python/dyn +tag_binary +vertsplit
system vimrc file: "$VIM\vimrc"
user vimrc file: "$HOME\_vimrc"
2nd user vimrc file: "$HOME\vimfiles\vimrc"
3rd user vimrc file: "$VIM\_vimrc"
user exrc file: "$HOME\_exrc"
2nd user exrc file: "$VIM\_exrc"
system gvimrc file: "$VIM\gvimrc"
user gvimrc file: "$HOME\_gvimrc"
2nd user gvimrc file: "$HOME\vimfiles\gvimrc"
3rd user gvimrc file: "$VIM\_gvimrc"
defaults file: "$VIMRUNTIME\defaults.vim"
system menu file: "$VIMRUNTIME\menu.vim"
Compilation: cl -c /W3 /GF /nologo -I. -Iproto -DHAVE_PATHDEF -DWIN32 -DFEAT_CSCOPE -DFEAT_TERMINAL -DFEAT_SOUND -DFEAT_NETBEANS_INTG -DFEAT_JOB_CHANNEL -DFEAT_IPV6 -DFEAT_XPM_W32 -DWINVER=0x0501 -D_WIN32_WINNT=0x0501 /source-charset:utf-8 /MP -DHAVE_STDINT_H /Ox /GL -DNDEBUG /arch:IA32 /Zl /MT /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE -DFEAT_OLE -DFEAT_MBYTE_IME -DDYNAMIC_IME -DFEAT_GUI_MSWIN -DFEAT_DIRECTX -DDYNAMIC_DIRECTX -DFEAT_DIRECTX_COLOR_EMOJI -DDYNAMIC_ICONV -DDYNAMIC_GETTEXT -DFEAT_TCL -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"tcl86t.dll\" -DDYNAMIC_TCL_VER=\"8.6\" -DFEAT_LUA -DDYNAMIC_LUA -DDYNAMIC_LUA_DLL=\"lua53.dll\" -DFEAT_PYTHON -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL=\"python27.dll\" -DFEAT_PYTHON3 -DDYNAMIC_PYTHON3 -DDYNAMIC_PYTHON3_DLL=\"python36.dll\" -DFEAT_MZSCHEME -I "E:\Racket\include" -DMZ_PRECISE_GC -DDYNAMIC_MZSCHEME -DDYNAMIC_MZSCH_DLL=\"libracket3m_a36fs8.dll\" -DDYNAMIC_MZGC_DLL=\"libracket3m_a36fs8.dll\" -DFEAT_PERL -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl524.dll\" -DFEAT_RUBY -DDYNAMIC_RUBY -DDYNAMIC_RUBY_DLL=\"msvcrt-ruby240.dll\" -DRUBY_VERSION=24 -DFEAT_HUGE /Fd.\ObjGXOULYHTRZi386/ /Zi
Linking: link /nologo /opt:ref /LTCG:STATUS oldnames.lib kernel32.lib advapi32.lib shell32.lib gdi32.lib comdlg32.lib ole32.lib netapi32.lib uuid.lib /machine:i386 gdi32.lib version.lib winspool.lib comctl32.lib advapi32.lib shell32.lib netapi32.lib /machine:i386 libcmt.lib oleaut32.lib user32.lib /nodefaultlib:lua53.lib /STACK:8388608 /nodefaultlib:python27.lib /nodefaultlib:python36.lib "E:\ActiveTcl\lib\tclstub86.lib" winmm.lib WSock32.lib Ws2_32.lib xpm\x86\lib-vc14\libXpm.lib /PDB:gvim.pdb -debug
```
- Type:
- [ ] Bug
- [ ] Enhancement
- [ ] Feature Request
- [X] Question
- OS:
- [ ] All/Other
- [ ] Linux
- [ ] OS X
- [X] Windows
- Vim:
- [ ] Terminal Vim
- [X] GVim
- [ ] Neovim
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.