kien / ctrlp.vim

Fuzzy file, buffer, mru, tag, etc finder.
kien.github.com/ctrlp.vim
7.26k stars 676 forks source link

How to prevent ctrlp from changing working directory? #775

Closed chengweiv5 closed 5 years ago

chengweiv5 commented 5 years ago

I'm using spf13-vim and which install and enabled ctrlp by default.

for now I'm using cscope and found that there is a problem will cause cscope failed to jump to a symbol definition place due to can not find file because cscope index file with relative path, if ctrlp change working directory to another path, e.g. a subdirectory, then cscope will fail.

I did below configurations for ctrlp, but ctrlp still change working directory ever.

let g:ctrlp_working_path_mode = 'w'

or

let g:ctrlp_working_path_mode = 0

and check it applied in vim by run

:echo let g:ctrlp_working_path_mode

Is there anyway to disable ctrlp to change working directory?

chengweiv5 commented 5 years ago

I'm quite sure this is a ctrlp feature since if I disabled ctrlp plugin, vim doesn't change working directory if I set noautochdir.

chengweiv5 commented 5 years ago

Finally, I fixed this problem by deleting ~/.vimviews and ~/.viminfo directories. It's magic for me.