" Nerdtree settings " " Close all open buffers on entering a window if the only " buffer that's left is the NERDTree buffer function! s:CloseIfOnlyNerdTreeLeft() if exists("t:NERDTreeBufName") if bufwinnr(t:NERDTreeBufName) != -1 if winnr("$") == 1 q endif endif endif endfunction let NERDTreeDirArrows=1 let NERDTreeIgnore = ['\.pyc$', '\.swp$'] map nt :NERDTreeToggle autocmd WinEnter * call s:CloseIfOnlyNerdTreeLeft()