有没有简单的方法来排除FuzzyFinder搜索的文件?

Mar*_*rco 14 vim fuzzyfinder

我正在使用FuzzyFinder,并想知道如何指示FuzzyFinder排除它搜索的文件.现在我修改了插件代码,但必须有一个更简单的方法.

我想排除.class文件在结果中弹出.有关如何指示FuzzyFinder跳过这些文件的任何提示/提示?

Ben*_*oit 20

let g:fuf_file_exclude = '\v\~$|\.o$|\.exe$|\.bak$|\.swp$|\.class$'
Run Code Online (Sandbox Code Playgroud)

用于:help fuf-options了解更多详情.

  • 如果你想要正则表达式,请在开始时记住`\ v`!如果使用`FufCoverageFile`,也可以使用`g:fuf_coveragefile_exclude`. (5认同)

Bra*_*don 5

在Benoit的帮助下:

"FuzzyFinder should ignore all files in .gitignore
let ignorefile = ".gitignore"
if filereadable(ignorefile)

  let ignore = '\v\~$'
  for line in readfile(ignorefile)
    let line = substitute(line, '\.', '\\.', 'g')
    let line = substitute(line, '\*', '.*', 'g')
    let ignore .= '|^' . line
  endfor

  let g:fuf_coveragefile_exclude = ignore
endif
Run Code Online (Sandbox Code Playgroud)

在第八天,上帝被一种可怕的噪音惊醒,他确实创造了一个脚本来找到他干扰的主题.于是发现了虫子,他就击杀了它们.再次好了.

  • 如果你在设置`lcd`(本地当前目录)之后获取.vimrc,那肯定可以从`.vimrc`开始,但是如果你将标签或窗口切换到另一个具有不同`lcd`的项目,你必须重新获取你的`.vimrc`它全局地破坏了变量.有没有办法用不同的`lcd`做每个窗口? (2认同)