Skip to content

Instantly share code, notes, and snippets.

@hrsh7th
Created July 17, 2012 16:01
Show Gist options
  • Save hrsh7th/3130280 to your computer and use it in GitHub Desktop.
Save hrsh7th/3130280 to your computer and use it in GitHub Desktop.
let s:save_cpo = &cpo
set cpo&vim
function! unite#sources#my_file_rec#define()
return s:source
endfunction
let s:source = {
\ 'name': 'my/file_rec',
\ 'description': 'my files.'
\ }
function! s:source.gather_candidates(args, context)
return map(unite#get_candidates([['file_rec', '/path/to/my_file']]), "{
\ 'word' v:val.word,
\ 'action_path': v:val.action__path,
\ 'kind': 'my/file'
\ }")
endfunction
let &cpo = s:save_cpo
unlet s:save_cpo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment