如何快速找到NERDTree中的活动文件

时间:2012-01-01 13:45:41

标签: vim nerdtree

说,我正在编辑一个名为application_controller.rb的文件,该文件位于~/work/foo/app/controller/

现在我想打开NERDTree窗口,希望它可以自动展开文件夹~/work/foo/app/controller/,并将光标放在文件application_controller.rb上。怎么样?

1 个答案:

答案 0 :(得分:8)

: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.