I find myself in this situation very often:
- Open gVim with NERDTree from current working directory.
- Open a file from NERDTree using
<S-T>
so it grabs a new tab. :tabprevious
to return to NERDTree.- Explore directories and open a second file using
<S-T>
. - Close the second file,
:q
orZZ
.
What I would have expected to happen after 5. is to return to NERDTree, but Vim always collapses the tab and opens the one to the right. This is rarely what I intended to do and would much rather have Vim keep a list of all tabs I have cycled through. So, as I close one, it pops it off the stack and focuses the next.
This can be seen in other editors, mostly IDEs, like Komodo Edit for example.
Is there a plug-in which would do this for Vim?