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
如何让CtrlP(vim插件)忽略pdf文件?_Vim_Ctrlp - Fatal编程技术网

如何让CtrlP(vim插件)忽略pdf文件?

如何让CtrlP(vim插件)忽略pdf文件?,vim,ctrlp,Vim,Ctrlp,我在ubuntu下用vim编写一个latex文档,我想用它快速打开不同的文件 当我按下时,小窗口会按预期打开,但显示生成的论文.pdf文件,作为我实际要编辑的论文.tex文件之前的第一个点击 这是我的.vimrc中的设置(来自): 让g:ctrlp_map='' 设g:ctrlp\u custom\u ignore={ \“dir”:“\v[\/]\(git | hg | svn)$”, \“文件”:“\v\(exe | so | dll | pdf)$”, \ } 我如何才能让CtrlP不显

我在ubuntu下用vim编写一个latex文档,我想用它快速打开不同的文件

当我按下
时,小窗口会按预期打开,但显示生成的
论文.pdf
文件,作为我实际要编辑的
论文.tex
文件之前的第一个点击

这是我的
.vimrc
中的设置(来自):

让g:ctrlp_map=''
设g:ctrlp\u custom\u ignore={
\“dir”:“\v[\/]\(git | hg | svn)$”,
\“文件”:“\v\(exe | so | dll | pdf)$”,
\ }

我如何才能让CtrlP不显示匹配列表中的
.pdf
-文件(因为在vim中打开它们对我来说毫无意义)。我需要什么?

昨天我编辑了我的.gitignore文件,瞧,我心爱的ctrl-p识别出了这一变化,避免显示我从文档中添加到gitignore文件的扩展名:[link]
set wildignore+=*.pdf
谢谢,但不幸的是,这不起作用。是否有任何其他vim设置可能会干扰wildignore?我确实发现这个[链接]可能会有所帮助
let g:ctrlp_map = '<c-p>' 

let g:ctrlp_custom_ignore = {
  \ 'dir':  '\v[\/]\.(git|hg|svn)$',
  \ 'file': '\v\.(exe|so|dll|pdf)$',
  \ }