aboutsummaryrefslogtreecommitdiff
path: root/autoload/unite/sources
diff options
context:
space:
mode:
authorYasuhiro Matsumoto <mattn.jp@gmail.com>2020-01-26 01:16:54 +0900
committerYasuhiro Matsumoto <mattn.jp@gmail.com>2020-01-26 01:16:54 +0900
commita265ddb08fcaecc7ed52d2540585dd592df2c675 (patch)
tree037d4befcfdee7ff7545848c408ea1e0c940f405 /autoload/unite/sources
parenta6adfee6ee5e59308f85bcfa331396814fb4d7d7 (diff)
downloadvim-sonictemplate-a265ddb08fcaecc7ed52d2540585dd592df2c675.tar.gz
vim-sonictemplate-a265ddb08fcaecc7ed52d2540585dd592df2c675.tar.bz2
vim-sonictemplate-a265ddb08fcaecc7ed52d2540585dd592df2c675.zip
Use default for _name_
Diffstat (limited to 'autoload/unite/sources')
-rw-r--r--autoload/unite/sources/sonictemplate.vim12
1 files changed, 6 insertions, 6 deletions
diff --git a/autoload/unite/sources/sonictemplate.vim b/autoload/unite/sources/sonictemplate.vim
index 93578b7..894da2e 100644
--- a/autoload/unite/sources/sonictemplate.vim
+++ b/autoload/unite/sources/sonictemplate.vim
@@ -6,16 +6,16 @@
let s:save_cpo = &cpo
set cpo&vim
-function! unite#sources#sonictemplate#define()"{{{
+function! unite#sources#sonictemplate#define() abort "{{{
return s:source
-endfunction"}}}
+endfunction "}}}
let s:source = {
\ 'name' : 'sonictemplate',
\ 'description' : 'disp templates for sonictemplate',
\}
-function! s:source.gather_candidates(args, context)"{{{
+function! s:source.gather_candidates(args, context) abort "{{{
call unite#print_message('[sonictemplate]')
return s:uniq(map(
\ sonictemplate#complete("", "", 0), '{
@@ -27,10 +27,10 @@ function! s:source.gather_candidates(args, context)"{{{
\ "action__path" : v:val,
\ }'
\ ))
-endfunction"}}}
+endfunction "}}}
" local functions {{{
-function! s:uniq(candidates)
+function! s:uniq(candidates) abort
let has = {}
let uniq_list = []
for candidate in a:candidates
@@ -44,7 +44,7 @@ function! s:uniq(candidates)
return uniq_list
endfunction
-function! s:to_template_name(path)
+function! s:to_template_name(path) abort
return substitute(fnamemodify(a:path, ':t:r'), '^\%(base\|snip\)-', '', '')
endfunction
" }}}