fixed it so ctrl-n opens nerdtree and vim closes if nerdtree is last window open