Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an easy way to exclude files for which FuzzyFinder searches?

I am using FuzzyFinder and was wondering how I could instruct FuzzyFinder to exclude files it searches for. For now I have modified the plugin code but there must be a more easy way.

I want to exclude .class files from popping up in the result. Any hints/tips on how can I instruct FuzzyFinder to skip these files?

like image 690
Marco Avatar asked Nov 09 '10 11:11

Marco


2 Answers

let g:fuf_file_exclude = '\v\~$|\.o$|\.exe$|\.bak$|\.swp$|\.class$'

Use :help fuf-options for more details.

like image 175
Benoit Avatar answered Nov 20 '22 09:11

Benoit


With the help of 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

And on the eighth day God was awakened by a terrible noise, and he did create a script to locate the subject of his disturbance. Thereupon finding bugs, he smote them. And it was good once more.

like image 5
Brandon Avatar answered Nov 20 '22 09:11

Brandon