vim plug-in - current path problem when vim ctrlp file search
phpcn_u1582
phpcn_u1582 2017-05-16 16:34:01
0
1
883

When I use the ctrlp plug-in to open a file, after opening a certain file, the file directory automatically switches to the directory where the certain file is located, so I cannot search for files in other directories.

As shown in the picture, I created the directory ABC and two files de,
When I,

cd A
vim .
:pwd #这里显示的是A
#<leader>p ctrlp的快捷键搜索当前目录下的子文件,打开文件d
:pwd #这时候显示的是 /A/B  因此这时候我想通过ctrlp搜索目录下的其他文件的时候就搜索不到了,例如搜不到上述例子中的文件e

The vimrc configuration file does not have a setting item for set autochildir

phpcn_u1582
phpcn_u1582

reply all(1)
巴扎黑

I saw these two lines of code in my vimrc configuration

"工作目录随文件变
autocmd BufEnter * cd %:p:h

Sure enough, you have to configure the configuration yourself, don’t copy and paste other people’s directly. . .

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!