Update coffee, html and latex

This commit is contained in:
Adam Stankiewicz
2013-09-30 12:03:06 +02:00
parent 04e6a8a73c
commit e9d8c39608
3 changed files with 41 additions and 20 deletions

View File

@@ -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