Skip to content
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

Is that possible to save and restore the nerdtree status? What collapsed and what expanded. #925

Closed
sgon00 opened this issue Dec 2, 2018 · 6 comments
Assignees

Comments

@sgon00
Copy link

sgon00 commented Dec 2, 2018

Hi, I am using vim session vim -S. I have read all the issues related to vim session. I know I can not save nerdtree to the session file and I know I'd better quit the nerdtree before I mksession. I am OK to reopen the nerdtree everytime when I launch vim. The only problem and headache I have is how to possibly load the last nerdtree listing status? To resotre what directories are collapsed and what directories are expanded. Thank you very much.

@PhilRunninger
Copy link
Member

Have you seen #248? There is a separate project mentioned in there that was written to provide this functionality. It hasn't been touched in a while, so your mileage may vary.

@sgon00
Copy link
Author

sgon00 commented Dec 6, 2018

@PhilRunninger thank you very much for the reply. I read that issue before. It was talking about bookmark. I never use bookmark before. and Which separate project do you mean? Do you mean https://github.com/jistr/vim-nerdtree-tabs? In the project readme.md, it does not mention anything about restoring status. I installed that plugin. I don't know how to make it store my nerdtree status. After the installation, I tried, the status is not restored.

@PhilRunninger
Copy link
Member

Sorry. I should have been more specific. The project is https://github.com/scrooloose/nerdtree-project-plugin.

@sgon00
Copy link
Author

sgon00 commented Dec 6, 2018

@PhilRunninger thanks a lot for the reply. maybe I am stupid. I tried my best but I still don't figure out how to use it. After the installation:

  • I did touch ~/.NERDTreeProjects even if this might not be necessary.

  • When execute :NERDTreeProjectSave abc in NERD Tree buffer window, it reports:

Error detected while processing function 266[7]..269[13]..279:
line    3:
E716: Key not present in Dictionary: getDirChildren()
E15: Invalid expression: a:rootNode.getDirChildren()
  • When execute :NERDTreeProjectSave abc in non-nerdtree buffer window, it reports:
E121: Undefined variable: b:NERDTree
E116: Invalid arguments for function 266

I really need a doc on how to use it. Sorry about all the troubles and questions. Thanks a lot for your time.

@PhilRunninger
Copy link
Member

I'm not surprised you're seeing these errors. A lot has changed in NERDTree since that project was last touched 3 years ago. I'll take a look at this, and see about moving it into NERDTree. I don't have write access to that project, and I'm pretty sure Marty's not interested in updating it.

@sgon00
Copy link
Author

sgon00 commented Dec 6, 2018

@PhilRunninger thank you very much for this help. This is really important to a NerdTree plugin. I really don't understand why this is not implemented all this years. Without this functionality, I have no reason to use this plugin instead of the built-in netrw. Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants