aboutsummaryrefslogtreecommitdiff
path: root/autoload/sonictemplate.vim
diff options
context:
space:
mode:
Diffstat (limited to 'autoload/sonictemplate.vim')
-rw-r--r--autoload/sonictemplate.vim8
1 files changed, 5 insertions, 3 deletions
diff --git a/autoload/sonictemplate.vim b/autoload/sonictemplate.vim
index 84d20d9..116a1aa 100644
--- a/autoload/sonictemplate.vim
+++ b/autoload/sonictemplate.vim
@@ -80,9 +80,11 @@ function! s:get_candidate(fts, lead)
for tmpldir in s:tmpldir
let tmp += map(split(globpath(join([tmpldir, ft], '/'), 'file-' . expand('%:t:r') . '*.*'), "\n"), 'fnamemodify(v:val, ":t:r")[5:]')
endfor
- for tmpldir in s:tmpldir
- let tmp += sort(map(split(globpath(join([tmpldir, '_'], '/'), 'file-' . expand('%:t:r') . '*.*'), "\n"), 'fnamemodify(v:val, ":t:r")[5:]'))
- endfor
+ if &ft == ''
+ for tmpldir in s:tmpldir
+ let tmp += sort(map(split(globpath(join([tmpldir, '_'], '/'), 'file-' . expand('%:t:r') . '*.*'), "\n"), 'fnamemodify(v:val, ":t:r")[5:]'))
+ endfor
+ endif
endif
for tmpldir in s:tmpldir
for ft in fts