diff options
-rw-r--r-- | plugin/template.vim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugin/template.vim b/plugin/template.vim index 391e17a..75c8ffe 100644 --- a/plugin/template.vim +++ b/plugin/template.vim @@ -88,7 +88,7 @@ function! s:Template(name) silent! normal dd endif let c = indent . substitute(c, "\n", "\n".indent, 'g') - if &expandtab || indent =~ '^ *$' + if len(indent) && (&expandtab || indent =~ '^ \+$') let c = substitute(c, "\t", repeat(' ', min([len(indent), &tabstop])), 'g') endif silent! put! = c |