I'm trying to get switch over to vim as my primary editor and I've installed the nerdTree plugin, but now when I try and use vimpager to replace less I get Error detected while processing VimEnter Auto commands for *:E492: Not an editor command: NERDTree  I've narrowed it down to this line in my .vimrc, but I don't know much about configuring vim, I got this .vimrc off the internet.autocmd VimEnter * NERDTree My best guess is that vimpager is trying to disable plugin, but the .vimrc is trying to load it, so they're getting an error.Any advise on resolving this?
Trying to get vimpager (to replace less) working with nerdTREE
vim
The correct fix is to move autocmd VimEnter * NERDTreeout of your ~/.vimrc and into ~/.vim/after/plugin/NERD_tree.vim.That way, the autocmd only gets run if NERD_tree has also been loaded.And to be more correct, you should probably make itif exists(loaded_nerd_tree)    echo 'loaded_nerd_tree' . loaded_nerd_treeendifthat way if the plugin is uninstalled, your after script won't still try to use the plugin.