- Improved indentation behavior.

This commit is contained in:
Shougo Matsushita 2012-10-06 17:56:10 +09:00
parent 365357b741
commit 2ce74aabd7
1 changed files with 6 additions and 3 deletions

View File

@ -573,9 +573,12 @@ function! s:indent_snippet(begin, end)"{{{
try
setlocal equalprg=
" Indent begin line.
call cursor(a:begin, 0)
silent normal! ==
" Check use of indent plugin.
if getline(a:begin+1) !~ '^\t\+'
" Indent begin line.
call cursor(a:begin, 0)
silent normal! ==
endif
let base_indent = matchstr(getline(a:begin), '^\s\+')
for line_nr in range(a:begin+1, a:end)