I'm running into a problem that I've never really ran into before with my setup. I've set up my NERDTree config in the
.vimrc so that every time that I open a directory NERDTree will also open but it should also stay open when I open a file (NERDTree to the left and buffers to the right) however, it doesn't do that. Right now it does open NERDTree but once I click
enter on the file I want to open, NERDTree closes and I'm left only with the file I opened (no NERDTree on the left). The code is as follows:
autocmd StdinReadPre * let s:std_in=1 autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
this is the config I've been using on my
.vimrc for NERDTree for quite some time, usually I just copy+paste my
.vimrc into any new install of vim and it works after setting everything up. And in this case, everything else works, and even NERDTree, but it just closes after I open the file.