aboutsummaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authormattn <mattn.jp@gmail.com>2012-04-13 10:27:23 +0900
committermattn <mattn.jp@gmail.com>2012-04-13 10:27:23 +0900
commitec9e4a2aa28bd9e20a7d1e14e74952462bb49a4f (patch)
treec1595e70f4502ed5ff2a9705ef2bb9d57b45bd5e /autoload
parent41bc85e984230758d4f50f630771fe1f039edc52 (diff)
downloadvim-sonictemplate-ec9e4a2aa28bd9e20a7d1e14e74952462bb49a4f.tar.gz
vim-sonictemplate-ec9e4a2aa28bd9e20a7d1e14e74952462bb49a4f.tar.bz2
vim-sonictemplate-ec9e4a2aa28bd9e20a7d1e14e74952462bb49a4f.zip
user configuration should be prior to default template directory.
Diffstat (limited to 'autoload')
-rw-r--r--autoload/sonictemplate.vim3
1 files changed, 2 insertions, 1 deletions
diff --git a/autoload/sonictemplate.vim b/autoload/sonictemplate.vim
index 033524a..04bfd22 100644
--- a/autoload/sonictemplate.vim
+++ b/autoload/sonictemplate.vim
@@ -6,7 +6,7 @@
let s:save_cpo = &cpo
set cpo&vim
-let s:tmpldir = [expand('<sfile>:p:h:h') . '/template/']
+let s:tmpldir = []
if exists('g:sonictemplate_vim_template_dir')
if type(g:sonictemplate_vim_template_dir) == 3
let s:tmpldir += map(g:sonictemplate_vim_template_dir, 'fnamemodify(expand(v:val), ":p")')
@@ -14,6 +14,7 @@ if exists('g:sonictemplate_vim_template_dir')
call add(s:tmpldir, fnamemodify(expand(g:sonictemplate_vim_template_dir), ":p"))
endif
endif
+call add(s:tmpldir, expand('<sfile>:p:h:h') . '/template/')
function! sonictemplate#select(mode) abort
let name = input(':Template ', '', 'customlist,sonictemplate#complete')