diff options
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/template.vim | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugin/template.vim b/plugin/template.vim index f200e74..8bd3a4f 100644 --- a/plugin/template.vim +++ b/plugin/template.vim @@ -20,7 +20,11 @@ command! -nargs=1 -complete=customlist,TemplateComplete Template call s:Template(<f-args>) -let s:tmpldir = expand('<sfile>:p:h:h') . '/template/' +if exists('g:template_vim_template_dir') + let s:tmpldir = g:template_vim_template_dir +else + let s:tmpldir = expand('<sfile>:p:h:h') . '/template/' +endif function! TemplateComplete(lead, cmdline, curpos) return map(split(globpath(s:tmpldir, a:lead.'*.'.&ft), "\n"), 'fnamemodify(v:val, ":t:r")') |