From e9d8c396089c56d39ae374f29d3a6f45b63420fc Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Mon, 30 Sep 2013 12:03:06 +0200 Subject: Update coffee, html and latex --- indent/html.vim | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'indent') diff --git a/indent/html.vim b/indent/html.vim index a4cd0c49..6c30555d 100644 --- a/indent/html.vim +++ b/indent/html.vim @@ -331,6 +331,24 @@ fun! HtmlIndentGet(lnum) let ind = ind - 1 endif + if getline(a:lnum) =~ '' + let block_start = search('^'.repeat(' ', ind * &sw).'\S' , 'bnW') + let prev_tag = search('', 'bW', block_start) + let prev_closetag = search('', 'W', a:lnum) + if prev_tag && !prev_closetag + let ind = ind - 1 + endif + endif + + if getline(a:lnum) =~ '' + let block_start = search('^'.repeat(' ', ind * &sw).'\S' , 'bnW') + let prev_tag = search('', 'bW', block_start) + let prev_closetag = search('', 'W', a:lnum) + if prev_tag && !prev_closetag + let ind = ind - 1 + endif + endif + if restore_ic == 0 setlocal noic endif -- cgit v1.2.3