New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make bookmarks remember state of tree #248
Comments
+1 |
6 similar comments
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
2 similar comments
+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 UPD: probably it should correctly works with buffers, not tabs. |
+1 |
1 similar comment
+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:
Thoughts/feedback welcome. |
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):
autocmd BufNewFile,BufRead /home/user/projects/project1/* let project_name=project1
on_NERDTree_open or on_[tab/buffer/NERDTree]_focus_in:
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 |
OK, I have fixed 2 bugs (see latest gist):
RE your idea above RE automatically loading projects when you enter the root (or by some similar condition): This might be a good idea. Unfortunately I have been drinking and can't think hard enough now :D |
If I understand you correctly, you can already use Have I understood you correctly? |
Hey all, FYI here is the latest version of the plugin above: https://github.com/scrooloose/nerdtree-project-plugin. Its still a WIP really - but I have been using it for a couple of weeks. Would appreciate any feedback and ideas. If all goes well, I plan to merge this into the main repo and replace bookmarks. |
@scrooloose I got an error with |
Has this been added to NERDTree already? I'm not sure if I'm just missing something or if it's not quite ready yet. |
No, its still a separate project, and no attention has been given to it in the last couple of years. It needs some feedback and probably some work before it will be included with NERDTree, especially if it's purpose is to replace bookmarks. @lifecrisis, tagging you for future development consideration. |
You can install it like you do any other plugin, and it should be ready for testing. (I haven't tried this myself, so your mileage may vary.) |
Okay, thanks for the info! I will probably give it a try. The main functionality, for me at least, is not so much the project-like functionality but simply just remembering which folder nodes have been opened - if there is a simple way to just keep track of folder states (expanded or collapsed) persisting through vim restarts that would be equally welcome to me. |
+1. I would like this too. |
+1, yes, please :( |
+1 me too |
+1 another vote, would double the usefulness of this plugin for my purposes |
any updates on this? Seems an old request |
Pull Request #929 should make the |
As of a4dd4e1, @scrooloose 's project plugin will work once again. All you need to do is update your NERDTree and install the https://github.com/scrooloose/nerdtree-project-plugin.git plugin just like you do any other Vim plugin. Then use the commands defined in it to manage your projects:
|
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.The text was updated successfully, but these errors were encountered: