diff options
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 | 
