how to locate active file in NERDTree quickly
Asked Answered
H

1

6

say, I'm editing a file called application_controller.rb, which in ~/work/foo/app/controller/.

Now I want to open NERDTree window, and hope it can automatically expand the folder ~/work/foo/app/controller/, and position the cursor at the file application_controller.rb. How?

Humanitarianism answered 1/1, 2012 at 13:45 Comment(0)
B
12

:NERDTreeFind is most probably what you're looking for:

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.
Boulevard answered 1/1, 2012 at 13:48 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.