aboutsummaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorYasuhiro Matsumoto <mattn.jp@gmail.com>2016-07-04 09:26:48 +0900
committerYasuhiro Matsumoto <mattn.jp@gmail.com>2016-07-04 09:26:48 +0900
commit58b5595f88909e9d45eb338e31d2952a8e1d9c8f (patch)
treee1667ebe88c483ccc415193d5f63314f5a81ee50 /autoload
parent7482fc53804b9925fc5352cd99f9ce7f239c36e5 (diff)
downloadvim-sonictemplate-58b5595f88909e9d45eb338e31d2952a8e1d9c8f.tar.gz
vim-sonictemplate-58b5595f88909e9d45eb338e31d2952a8e1d9c8f.tar.bz2
vim-sonictemplate-58b5595f88909e9d45eb338e31d2952a8e1d9c8f.zip
postfix
Diffstat (limited to 'autoload')
-rw-r--r--autoload/sonictemplate.vim8
1 files changed, 6 insertions, 2 deletions
diff --git a/autoload/sonictemplate.vim b/autoload/sonictemplate.vim
index 38928a7..91f45df 100644
--- a/autoload/sonictemplate.vim
+++ b/autoload/sonictemplate.vim
@@ -317,7 +317,8 @@ endfunction
let s:pat = {}
-function! sonictemplate#pattern()
+function! sonictemplate#postfix()
+ call sonictemplate#load_postfix()
if !has_key(s:pat, &ft)
return ''
endif
@@ -356,8 +357,11 @@ function! sonictemplate#pattern()
return ''
endfunction
-function! sonictemplate#load_pattern()
+function! sonictemplate#load_postfix()
let ft = &ft
+ if has_key(s:pat, ft)
+ return
+ endif
let tmp = []
for tmpldir in s:tmpldir
let tmp += split(globpath(join([tmpldir, ft], '/'), 'pattern.stpl'), "\n")