9
내 CtrlP 검색 디렉토리에서 NerdTree의 루트 디렉토리를 변경할 때마다 동적으로 변경되도록합니다.NerdTree의 루트에 따라 CtrlP의 검색 디렉토리를 변경하는 방법은 무엇입니까?
vim에서 플러그인 통신을위한 플러그인은 어떻게 작동합니까?
내 CtrlP 검색 디렉토리에서 NerdTree의 루트 디렉토리를 변경할 때마다 동적으로 변경되도록합니다.NerdTree의 루트에 따라 CtrlP의 검색 디렉토리를 변경하는 방법은 무엇입니까?
vim에서 플러그인 통신을위한 플러그인은 어떻게 작동합니까?
전혀 작동하지 않습니다. . Vim은 단순히 플러그인 작성자가 플러그인을 원활하게 함께 사용할 수 있도록하는 공통 인터페이스를 노출하지 않습니다. 어쩌면 언젠가 ...
한편 리버스 엔지니어링과 소스 코드 읽기는 항상, RTFM 인 입니다.
빔의 "현재 디렉토리를"변화에 관한 플러그인의 동작을 지시NERDTree의 NERDTreeChDirMode
옵션 :
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.
그래서 그것은 다음과 같습니다
CtrlP의 측면에서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_working_path_mode
옵션 재미있는 소리 아래의 두 가지 옵션을 통해 원하는 것을 얻을 수 있습니다.
let g:NERDTreeChDirMode = 2
let g:ctrlp_working_path_mode = 'rw'
우수 설명, thanks @romainl – Nozim