Created
March 13, 2011 01:28
-
-
Save h1mesuke/867775 to your computer and use it in GitHub Desktop.
Vim - Sample of custom filter for unite.vim
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
let s:converter = { | |
\ 'name' : 'converter_file_mru', | |
\ 'description' : 'file_mru converter', | |
\ } | |
function! s:converter.filter(candidates, context) | |
let candidates = copy(a:candidates) | |
for cand in candidates | |
let cand.abbr = substitute(cand.abbr, '^([^)]*)', '', '') | |
endfor | |
return candidates | |
endfunction | |
call unite#define_filter(s:converter) | |
unlet s:converter | |
call unite#custom_filters('file_mru', ['matcher_glob', 'converter_file_mru']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment