aboutsummaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authormattn <mattn.jp@gmail.com>2011-10-27 21:36:14 +0900
committermattn <mattn.jp@gmail.com>2011-10-27 21:36:14 +0900
commit14c8d14ed2fc9eb727c389532186b531e32b907c (patch)
tree066fab7ab7fa483598abfef90be11c292a385e5a /plugin
parent0030ae8a1c32ed7ebd4faf1b9f52297486a28f6d (diff)
downloadvim-sonictemplate-14c8d14ed2fc9eb727c389532186b531e32b907c.tar.gz
vim-sonictemplate-14c8d14ed2fc9eb727c389532186b531e32b907c.tar.bz2
vim-sonictemplate-14c8d14ed2fc9eb727c389532186b531e32b907c.zip
fix indent.
Diffstat (limited to 'plugin')
-rw-r--r--plugin/template.vim2
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