简体   繁体   English

VIM:在netrw窗口中,如何返回以探索PWD?

[英]VIM: In netrw window, how to return back to explore PWD?

When I use :Explore to open netrw window and click ../ a few times, it will navigate to other path. 当我使用:Explore打开netrw窗口并单击../几次时,它将导航到其他路径。 Now, I want it back to :Explore my PWD path which is the path I launched the vim. 现在,我想让它回到:Explod我的PWD路径,这是我启动vim的路径。 What is the easiest way to achieve this? 最简单的方法是什么? Thanks a lot. 非常感谢。

Browsing within :Explore does not change the current working directory; :Explore不会更改当前工作目录; you can call :pwd to verify. 您可以致电:pwd进行验证。 With the corresponding :help getcwd() function, you can pass that to another :Explore command: 使用相应的:help getcwd()函数,可以将其传递给另一个:Explore命令:

:exe 'Explore' getcwd()

If that's too much to type, you can define your own command: 如果输入的内容太多,则可以定义自己的命令:

:command! Oexplore exe 'Explore' getcwd()

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM