How to quickly find the active file in NERDTree

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

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

+4
source share
1 answer

:NERDTreeFind most likely what you are looking for:

 Find the current file in the tree. If not tree exists and the current file is under vim CWD, then init a tree at the CWD and reveal the file. Otherwise init a tree in the current file directory. 
+8
source

Source: https://habr.com/ru/post/1388800/


All Articles