When I use ctrlp plug-in to open a file, after opening a file, the file directory automatically switches to the directory where a file is located, so I can’t search for files in other directories.
As shown in the figure, I created ABC directory and de files.
When I was,
cd A vim . : pwd # here is a. # < leader > ptrlp shortcut key searches for subfiles in the current directory and opens file d : pwd # shows /A/B at this time, so I can't find other files in the directory through ctrlp at this time, for example, file E in the above example can't be found.
The vimrc configuration file does not have a set entry for set autochildir
I saw these two lines of code in my vimrc configuration.
"The working directory changes with the file autocmd BufEnter * cd %:p:h
Indeed as expected configuration to match their own, do not directly copy and paste others. . .