How do I add NERDTree to my .vimrc?
I like to open NERDTree on startup, but with two requirements:
I use this command:
autocmd VimEnter * if !argc() | NERDTree | wincmd p | q | endif
Update (9 Jan 2022)
I've found a more performant way to meet the two requirements I've specified above.
Remove the autocmd, which I've mentioned above, from the .vimrc file. Instead, create an alias like this:
vim() {
if [ $# -eq 0 ]; then
/usr/bin/vim ./
else
/usr/bin/vim "$@"
fi
}