summaryrefslogtreecommitdiffstats
path: root/indent
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2013-09-30 12:03:06 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2013-09-30 12:03:06 +0200
commite9d8c396089c56d39ae374f29d3a6f45b63420fc (patch)
treeeffecc4b183dcd14056d0bfb9c6d908cc7c8eb84 /indent
parent04e6a8a73cce5f4b78671e87aba19ce9abb52ac4 (diff)
downloadvim-polyglot-e9d8c396089c56d39ae374f29d3a6f45b63420fc.tar.gz
vim-polyglot-e9d8c396089c56d39ae374f29d3a6f45b63420fc.zip
Update coffee, html and latex
Diffstat (limited to 'indent')
-rw-r--r--indent/html.vim18
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