aboutsummaryrefslogtreecommitdiff
path: root/autoload/unite/kinds/sonictemplate.vim
blob: a42bced1becdd1773108f3eaf1377c25f3da9a42 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
" File:    sonictemplate.vim
" Author:  kmnk <kmnknmk+vim@gmail.com>
" Version: 0.1.0
" License: BSD style license

let s:save_cpo = &cpo
set cpo&vim

function! unite#kinds#sonictemplate#define() abort "{{{
  return s:kind
endfunction "}}}

let s:kind = {
\ 'name' : 'sonictemplate',
\ 'default_action' : 'insert',
\ 'parents' : ['file'],
\ 'action_table' : {},
\ 'alias_table' : {},
\}

let s:kind.action_table.insert = {
\ 'description' : 'insert this template',
\ 'is_selectable' : 0,
\ 'is_quit' : 1,
\ 'is_invalidate_cache' : 0,
\ 'is_listed' : 1,
\}
function! s:kind.action_table.insert.func(candidate) abort "{{{
  call sonictemplate#apply(
\   a:candidate.word,
\   a:candidate.action__mode,
\ )
endfunction "}}}

" local functions {{{
" }}}

let &cpo = s:save_cpo
unlet s:save_cpo
" __END__