Handling NERDTree when Vim starts up

The NERDTree plugin is great for making Vim feel more like an IDE but it can really get in the way if you have it enabled all the time. Especially if vi is your default editor on an Ubuntu system. So adding this to your vimrc file looks like a good solution. Only open the file browser if no file name is specified on the command line:

autocmd VimEnter * if !argc() | NERDTree | endif

Source – http://stackoverflow.com/questions/1447334/how-do-you-add-nerdtree-to-your-vimrc

Author: Joel Sutton