Make bookmarks remember state of tree
I often do :NERDTree <bookmark> then manually open the various subdirectories I want. It would be super convenient if NERDTree remembered the open/closed state of the tree when I create a bookmark so I don't have to do it myself.
+1
+1
+1
+1
+1
+1
+1
+1 sad so see this must have feature is pending from almost two year :(.
+1
+1
+1
Gentlemen, I hear you and will be implementing this shortly.
You all can use this plugin: https://github.com/jistr/vim-nerdtree-tabs It works, but also "blinks" on my configuration, but you should try to use it!
UPD: probably it should correctly works with buffers, not tabs.
+1
+1
Hey all, I have been looking into this and have taken a stab at it here: https://gist.github.com/scrooloose/741b04b0a6dc8c69d043
Things to note:
- I have called the idea "projects" instead of "bookmarks" since that is the direction they are heading in.
- The concept is implemented as a nerdtree plugin at the moment. When the code/functionality stabilizes I will either add it to the core, or leave it as a plugin and hand it off to someone.
- The interface is just
:commandsat the moment, but this may get more snazzy later according to feedback. - Currently, the only functionality that projects offer over bookmarks is remembering the state of the tree. I have other ideas and feature requests that may be implemented though.
Thoughts/feedback welcome.
Do you have the latest version of nerdtree? (I should have mentioned that)
Do you have the latest version of nerdtree? (I should have mentioned that)
Sorry, I've just updated and it only requires to manually create the "touch ~/.NERDTreeProjects"
I can offer this use case (I will add it by myself, but not now). It will give you dynamicaly synchronization between tabs (I hope):
- Add to .vimrc
autocmd BufNewFile,BufRead /home/user/projects/project1/* let project_name=project1
- Add to NERDTree this functionality:
on_NERDTree_open or on_[tab/buffer/NERDTree]_focus_in:
if (project_name) then NERDTreeProjectLoad project_name
on_NERDTree_close or on_[tab/buffer/NERDTree]_focus_out:
if (project_name)
then NERDTreeProjectSave project_name
And thank you for you job! <3
Also now it has a bug with autocomplete of project names:
What I do:
:NERDTreeProjectLoad t<tab>
What I get (but it works!):
:NERDTreeProjectLoad test
test test test
:NERDTreeProjectLoad test