A simple command line fuzzy matcher, written in Haskell
Just a make
away
Adapted from Burke's matcher, replace
g:path_to_hmatcher
with the path to the hmatcher executable:
let g:path_to_hmatcher = "/path/to/hmatcher"
if !empty(glob(g:path_to_hmatcher))
let g:ctrlp_match_func = { 'match': 'HMatch' }
endif
function! HMatch(items, str, limit, mmode, ispath, crfile, regex)
let cachefile = ctrlp#utils#cachedir().'/matcher.cache'
if !( filereadable(cachefile) && a:items == readfile(cachefile) )
call writefile(a:items, cachefile)
endif
if !filereadable(cachefile)
return []
endif
let cmd = g:path_to_hmatcher . " " . shellescape(a:str) . " " . a:limit . " < " . cachefile
return split(system(cmd), "\n")
endfunction