2014-02-19 2 views

ответ

20

Это не работает вообще. Vim просто не раскрывает общий интерфейс, который помог бы разработчикам плагина сделать плагины плавно вместе. Возможно, однажды ...

В то же время мы оставляем обратную инженерию, считываем исходный код и, , как всегда, RTFM.

NERDTreeChDirMode вариант NERDTree, что диктует поведение плагина в отношении изменения «текущего каталога» Vim в:

If the option is set to 2 then it behaves the same as if set to 1 except that 
the CWD is changed whenever the tree root is changed. For example, if the CWD 
is /home/marty/foobar and you make the node for /home/marty/foobar/baz the new 
root then the CWD will become /home/marty/foobar/baz. 

На стороне CtrlP, в вариант ctrlp_working_path_mode звучит интересно:

w - begin finding a root from the current working directory outside of CtrlP 
    instead of from the directory of the current file (default). Only applies 
    when "r" is also present. 

Так выглядит два варианта ниже дадут вам то, что вы хотите:

let g:NERDTreeChDirMode  = 2 
let g:ctrlp_working_path_mode = 'rw' 
+0

отличное описание, спасибо @romainl – Nozim