Created
November 14, 2019 03:30
-
-
Save mattn/d909c93784aa81d97b82c0896ef38ca8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! s:fuzzy(lhs, rhs) abort | |
return a:lhs =~ join(map(split(a:rhs, '\zs'), "printf('[\\x%02x].*', char2nr(v:val))"), '') | |
endfunction | |
let g:asyncomplete_preprocessor = | |
\ [function('asyncomplete#preprocessor#ezfilter#filter')] | |
let g:asyncomplete#preprocessor#ezfilter#config = {} | |
let g:asyncomplete#preprocessor#ezfilter#config['*'] = | |
\ {ctx, items -> filter(items, 's:fuzzy(v:val.word, ctx.base) != 0')} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I wish vim script gained
lshift()
function which acceleratedosa_filter
. The algorithms are different in python and vim script versions.