From 3b94a6e6b8232bc3778f8959d6d35f13449f241c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Yngve=20Lerv=C3=A5g?= Date: Sun, 24 Jan 2016 23:11:39 +0100 Subject: [PATCH] Add action to unite source (#330) --- autoload/unite/sources/vimtex_toc.vim | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/autoload/unite/sources/vimtex_toc.vim b/autoload/unite/sources/vimtex_toc.vim index 76e3d76..542a92a 100644 --- a/autoload/unite/sources/vimtex_toc.vim +++ b/autoload/unite/sources/vimtex_toc.vim @@ -10,15 +10,20 @@ set cpo&vim let s:source = { \ 'name' : 'vimtex_toc', \ 'sorters' : 'sorter_nothing', + \ 'default_kind' : 'jump_list', \} -function! s:source.gather_candidates(args, context) +function! s:source.gather_candidates(args, context) " {{{1 let entries = vimtex#toc#get_entries() return map(entries, '{ \ "word" : v:val.title, + \ "action__path" : v:val.file, + \ "action__line" : v:val.line, \ }') endfunction +" }}}1 + function! unite#sources#vimtex_toc#define() return s:source endfunction