Nerdtree - save state of opened directories

时间秒杀一切 提交于 2019-12-04 10:09:08

问题


A typical workflow for me is opening Vim (MacVim to be precise), doing:

:NERDTree <bookmark>

then manually opening various subdirectories I want to use. Often it's the same set of directories I had open when I was last working on the project. I'm aware of the O recursive-open command but if it's a large tree I then have to go and close a load of them to clear the screen up.

Is there any way of saving the ones that are open / the general 'state'?


回答1:


Unfortunately, there is no way to do this in NERDTree - yet. If you feel like the feature deserves attention, however, you can add it yourself or submit a request for it on GitHub, and it will be available to you soon.

Edit: I took the liberty of submitting the feature request myself; you can track its status here.




回答2:


Sure just save the session with ":mksession ~/mysession.vim". ":mks" works too. Then just source the file and there you go.



来源:https://stackoverflow.com/questions/11328664/nerdtree-save-state-of-opened-directories

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!