I have following in my
~/.vimrc to make sure that nerdtree opens for every tab:
autocmd VimEnter * NERDTree
I also have this in the
~/.vimrc to make sure that every new buffer opens in its own tab:
au BufAdd,BufNewFile * nested tab sball
At the moment, I'm trying to learn Go programming on vim and have installed
vim-go plugin. What happens is that if I hit
] to open the definition for identifier under the cursor, vim does open it in a new tab but nerdtree disappears from all tabs.
If I hit
<F2> in the very first tab that was opened by vim, nerdtree opens just fine. But in the subsequent tabs,
<F2> causes nerdtree to open in its own tab (it opens a scratch tab with just nerdtree).
How do I make sure that nerdtree opens just fine always? I don't need to open nerdtree by default for every tab or every time I open vim. But I need to hit
<F2> to open it up so that I can open other files when needed.