Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
比如说,我正在编辑一个名为 application_controller.rb 的文件,该文件位于~/work/foo/app/controller/.
~/work/foo/app/controller/
现在我想打开NERDTree窗口,希望它能自动展开文件夹~/work/foo/app/controller/,并将光标定位在文件上application_controller.rb。如何?
application_controller.rb
:NERDTreeFind很可能是您正在寻找的东西:
:NERDTreeFind
Find the current file in the tree. If not tree exists and the current file is under vim's CWD, then init a tree at the CWD and reveal the file. Otherwise init a tree in the current file's directory.