diff options
author | mattn <mattn.jp@gmail.com> | 2011-10-27 21:36:14 +0900 |
---|---|---|
committer | mattn <mattn.jp@gmail.com> | 2011-10-27 21:36:14 +0900 |
commit | 14c8d14ed2fc9eb727c389532186b531e32b907c (patch) | |
tree | 066fab7ab7fa483598abfef90be11c292a385e5a /plugin | |
parent | 0030ae8a1c32ed7ebd4faf1b9f52297486a28f6d (diff) | |
download | vim-sonictemplate-14c8d14ed2fc9eb727c389532186b531e32b907c.tar.gz vim-sonictemplate-14c8d14ed2fc9eb727c389532186b531e32b907c.tar.bz2 vim-sonictemplate-14c8d14ed2fc9eb727c389532186b531e32b907c.zip |
fix indent.
Diffstat (limited to 'plugin')
-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 |