Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/vim/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
ViM+;CtrlP:g:CtrlP_自定义_忽略未使用_Vim_Ctrlp - Fatal编程技术网

ViM+;CtrlP:g:CtrlP_自定义_忽略未使用

ViM+;CtrlP:g:CtrlP_自定义_忽略未使用,vim,ctrlp,Vim,Ctrlp,在~/.vimrc中,我设置了: " Configure CtrlP " Ctrl-O opens CtrlP for the current word. map <C-o> <C-P><C-\>w " Ensure we aren't using a custom command. if exists("g:ctrl_user_command") unlet g:ctrlp_user_command endif " Specify the cach

~/.vimrc
中,我设置了:

" Configure CtrlP

" Ctrl-O opens CtrlP for the current word.
map <C-o> <C-P><C-\>w

" Ensure we aren't using a custom command.
if exists("g:ctrl_user_command")
  unlet g:ctrlp_user_command
endif

" Specify the cache directory.
let g:ctrlp_cache_dir = $HOME . '/.cache/ctrlp'

" Ignore certain files and directories.
let g:ctrlp_custom_ignore = {
  \ 'dir':  '\v(\.git|\.hg|\.svn\|vendor|tmp)$',
  \ 'file': '\v\.(swp|swo)$',
  \ 'link': '',
  \ }

" Disable opening files in a new buffer ("e").
" Default to opening files in a new tab ("t").
let g:ctrlp_prompt_mappings = {
    \ 'AcceptSelection("e")': [],
    \ 'AcceptSelection("t")': ['<cr>', '<2-LeftMouse>'],
    \ }
如果我删除
g:ctrlp\u custom\u ignore
并添加以下内容:

set wildignore+=*/tmp/*,*.so,*.swp,*.swo,*/vendor/*,*/\.git/*
CtrlP不为
供应商/
中的文件编制索引。为什么CtrlP不使用
g:CtrlP\u custom\u ignore


相关问题:


如果您需要加快CtrlP的索引速度,可以使用ag-to-grep文件(参见我的答案)。它也可以帮助你。谢谢@ryuichiro。我切换到ag,一切都很好。如果你需要加快CtrlP的索引,你可以使用ag到grep文件(见我的答案)。它也可以帮助你。谢谢@ryuichiro。我换了ag,一切都很好。
set wildignore+=*/tmp/*,*.so,*.swp,*.swo,*/vendor/*,*/\.git/*