Reputation: 4722
I'm looking for a way to either:
I've tried a number of approaches. For example using
autocmd TabEnter * NERDTreeToggle
That gets quite messy. The tab opens with NERDTree on the right side. And If I focus on another tab and go back to the new tab it opens a third split with the NERDTree correctly on the right side.
I'm also trying to simply use T when opening a file. The focus doesn't change to new file alright but it NERDTree disappears and I'm left in a 'No Name' tab.
Anyone have a neat solution here?
UPDATE:
reset NERDTree to HEAD - T on open started to work
I'd still really like a solution to keep NERDTree open by default on left of all tabs.
Upvotes: 0
Views: 3748
Reputation: 196526
I've seen this project a while ago. I've never tried it because I'm not interested in that feature, maybe others did?
But you should stop trying to use Vim as if it was Gedit or TextMate or whatever other editor you are used to. Tabs in Vim don't work at all like tabs in other editors: you can't think of them as 1:1 "proxies" for specific files because they can contain any number of "files" and their names are succeptible to change in many ways.
Instead, learn about "buffers" and "windows".
Upvotes: 5