In my vimrc,
autocmd VimEnter * NERDTree
autocmd VimEnter * wincmd p
but when I start writting a file, it tips error:
Error detected while processing VimEnter Auto commands for "*":
E492: Not an editor command: NERDTree
Anyone can help me ?
I tried to install NERDTree using vim-plug, so when I started vim and run :PlugInstall, I can use :NERDTree command but after going out it was no available, reason is I didn't download plugin cause I used github, so according to documentation you have to use it on demand and wrap it up your instruction:
call plug#begin('~/.vim/plugged') " Specify folder
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
call plug#end() " Initializes plugins
So your plugins are available now, and you can use your instructions:
autocmd VimEnter * NERDTree
autocmd VimEnter * wincmd p
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With