Changing drive letter in NERDtree

强颜欢笑 提交于 2019-12-04 08:10:43

问题


I started using NERDtree plugin on a a windows platform. I can't seem to find a way to change the drive letter. Going up all the way on the directory tree doesn't lead to the drive letter. Any ideas? (Yes, I know, it's going to be a simple answer)


回答1:


If you want to go to your Z drive, for example, start it as:

:NERDTree Z:\



回答2:


If you use:

:NERDTree d:\

in the NERDTree window you will see it works. But now if you open(and edit) a file with NERDTree you will find it can not be saved, because the current working directory has not changed'; it is still in the old directory!

So if you want change the drive in NERDTree I advise you to perform the following 2 steps:

cd drive:\

:NERDTree .

where drive is the drive letter you want to change to, and . means change the NERDTree directory to the current working directory.

Now you can use NERDTree opening (or editing)the file in new directory now.



来源:https://stackoverflow.com/questions/1467447/changing-drive-letter-in-nerdtree

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