Like what :Ve and :E did, but in NERDTree.
Asked
Active
Viewed 4,567 times
3 Answers
11
:NERDTree %
Works for me. % is the path to the current file, so you can't cd to %, but NERDTree interprets it intelligently and opens the folder instead of the file.
Philippe Mongeau
- 765
0
Do you want the ":NERDTree" / ":NERDTreeToggle" commands? Check out:
:help NERDTreeFunctionality
Heptite
- 20,411
0
One way is to automatically cd to the current file always. This works with NERDTree.
http://vim.wikia.com/wiki/Change_to_the_directory_of_the_current_file
function AlwaysCD()
if bufname("") !~ "^ftp://"
lcd %:p:h
endif
endfunction
autocmd BufEnter * call AlwaysCD()
cars
- 1