Closed hasufell closed 4 years ago
[[plugins]]
repo = 'scrooloose/nerdtree'
hook_add = '''
autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'NERDTree' argv()[0] | wincmd p | ene | exe 'cd '.argv()[0] | endif
'''
You need to know when hooks are executed.
I also tried adding autocmd VimEnter * call dein#call_hook('post_source') to my vimrc, but that didn't do the trick either.
this is wrong. Because, your VimEnter autocmd is defined in VimEnter. When it is executed? never.
I want to define this:
It isn't working (netrw is still opend instead of NERDTree). This approach used to work with vim-plug. I also tried adding
autocmd VimEnter * call dein#call_hook('post_source')
to my vimrc, but that didn't do the trick either.