diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2013-09-30 12:03:06 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2013-09-30 12:03:06 +0200 |
commit | e9d8c396089c56d39ae374f29d3a6f45b63420fc (patch) | |
tree | effecc4b183dcd14056d0bfb9c6d908cc7c8eb84 /indent | |
parent | 04e6a8a73cce5f4b78671e87aba19ce9abb52ac4 (diff) | |
download | vim-polyglot-e9d8c396089c56d39ae374f29d3a6f45b63420fc.tar.gz vim-polyglot-e9d8c396089c56d39ae374f29d3a6f45b63420fc.zip |
Update coffee, html and latex
Diffstat (limited to 'indent')
-rw-r--r-- | indent/html.vim | 18 |
1 files changed, 18 insertions, 0 deletions
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) =~ '<p\>' + let block_start = search('^'.repeat(' ', ind * &sw).'\S' , 'bnW') + let prev_tag = search('<p\>', 'bW', block_start) + let prev_closetag = search('</p\>', 'W', a:lnum) + if prev_tag && !prev_closetag + let ind = ind - 1 + endif + endif + + if getline(a:lnum) =~ '</\w\+>' + let block_start = search('^'.repeat(' ', ind * &sw).'\S' , 'bnW') + let prev_tag = search('<p\>', 'bW', block_start) + let prev_closetag = search('</p\>', 'W', a:lnum) + if prev_tag && !prev_closetag + let ind = ind - 1 + endif + endif + if restore_ic == 0 setlocal noic endif |