diff options
author | mattn <mattn.jp@gmail.com> | 2011-10-28 19:09:44 +0900 |
---|---|---|
committer | mattn <mattn.jp@gmail.com> | 2011-10-28 19:09:44 +0900 |
commit | 6e029a7db1baaecb792eddfd4dca38ffd5f9a132 (patch) | |
tree | 2b2f4bfc3e6cb7cf3fecd813fb84436b14ff520e /autoload | |
parent | 7ac0994466608725e7138feb9bb3aa00bdf6ae39 (diff) | |
download | vim-sonictemplate-6e029a7db1baaecb792eddfd4dca38ffd5f9a132.tar.gz vim-sonictemplate-6e029a7db1baaecb792eddfd4dca38ffd5f9a132.tar.bz2 vim-sonictemplate-6e029a7db1baaecb792eddfd4dca38ffd5f9a132.zip |
renamed to SonicTemplate.
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/sonictemplate.vim (renamed from autoload/template.vim) | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/autoload/template.vim b/autoload/sonictemplate.vim index b4b8ee6..c6bf121 100644 --- a/autoload/template.vim +++ b/autoload/sonictemplate.vim @@ -1,26 +1,26 @@ "============================================================================= -" template.vim +" sonictemplate.vim " Author: Yasuhiro Matsumoto <mattn.jp@gmail.com> " Last Change: 28-Oct-2011. let s:save_cpo = &cpo set cpo&vim -if exists('g:template_vim_template_dir') - let s:tmpldir = g:template_vim_template_dir +if exists('g:sonictemplate_vim_template_dir') + let s:tmpldir = g:sonictemplate_vim_template_dir else let s:tmpldir = expand('<sfile>:p:h:h') . '/template/' endif -function! template#select() abort - let name = input(':Template ', '', 'customlist,template#complete') +function! sonictemplate#select() abort + let name = input(':Template ', '', 'customlist,sonictemplate#complete') if name == '' return endif - call template#apply(name) + call sonictemplate#apply(name) endfunction -function! template#complete(lead, cmdline, curpos) abort +function! sonictemplate#complete(lead, cmdline, curpos) abort if search('[^ \t]', 'wn') return map(split(globpath(join([s:tmpldir, &ft], '/'), 'snip-' . a:lead . '*.*'), "\n"), 'fnamemodify(v:val, ":t:r")[5:]') else @@ -28,7 +28,7 @@ function! template#complete(lead, cmdline, curpos) abort endif endfunction -function! template#apply(name) abort +function! sonictemplate#apply(name) abort let buffer_is_not_empty = search('[^ \t]', 'wn') if search('[^ \t]', 'wn') let fs = split(globpath(join([s:tmpldir, &ft], '/'), 'snip-' . a:name . '.*'), "\n") |