diff options
author | mattn <mattn.jp@gmail.com> | 2011-10-27 19:58:09 +0900 |
---|---|---|
committer | mattn <mattn.jp@gmail.com> | 2011-10-27 19:58:09 +0900 |
commit | 0aaeea605731cc4ff69addf9f1295d54c512783b (patch) | |
tree | 4f1fc0de9706fd63cac528403c0ec9909d6e3766 | |
parent | 5402106764cf0aea185f48dc1ca4d1e6356f7fd2 (diff) | |
download | vim-sonictemplate-0aaeea605731cc4ff69addf9f1295d54c512783b.tar.gz vim-sonictemplate-0aaeea605731cc4ff69addf9f1295d54c512783b.tar.bz2 vim-sonictemplate-0aaeea605731cc4ff69addf9f1295d54c512783b.zip |
be possible to change template directory.
-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")') |