I would like to configure my .vimrc so that NERDTree is open when vim (or MacVim) is called from the command line with a directory argument, but closes when vim is called with a file argument. I looked through the list of vim built-in variables, but couldn't find anything that looked promising.
source
share