From 2ce74aabd7629f2ffca3ed387934b1a7e9d5e53b Mon Sep 17 00:00:00 2001 From: Shougo Matsushita Date: Sat, 6 Oct 2012 17:56:10 +0900 Subject: [PATCH] - Improved indentation behavior. --- autoload/neosnippet.vim | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/autoload/neosnippet.vim b/autoload/neosnippet.vim index ea4f27d..bc16d5e 100644 --- a/autoload/neosnippet.vim +++ b/autoload/neosnippet.vim @@ -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)