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

@ -27,8 +27,8 @@ function! s:GetMakePrg()
\ ' -c' . \ ' -c' .
\ ' ' . b:coffee_litcoffee . \ ' ' . b:coffee_litcoffee .
\ ' ' . g:coffee_make_options . \ ' ' . g:coffee_make_options .
\ ' ' . fnameescape(expand('%')) . \ ' $*' .
\ ' $*' \ ' ' . fnameescape(expand('%'))
endfunction endfunction
" Set `makeprg` and return 1 if coffee is still the compiler, else return 0. " Set `makeprg` and return 1 if coffee is still the compiler, else return 0.

View File

@ -312,7 +312,7 @@ function! s:ReadTOC(auxfile, texfile, ...)
if included != '' if included != ''
" append the input TOX to `toc` and `fileindices` " append the input TOX to `toc` and `fileindices`
let newaux = prefix . '/' . included let newaux = prefix . '/' . included
let newtex = fnamemodify(fnamemodify(newaux, ':t:r') . '.tex', ':p') let newtex = fnamemodify(newaux, ':r') . '.tex'
call s:ReadTOC(newaux, newtex, toc, fileindices) call s:ReadTOC(newaux, newtex, toc, fileindices)
continue continue
endif endif
@ -441,6 +441,7 @@ function! s:FindClosestSection(toc, fileindices)
endif endif
let imax = len(a:fileindices[file]) let imax = len(a:fileindices[file])
if imax > 0
let imin = 0 let imin = 0
while imin < imax - 1 while imin < imax - 1
let i = (imax + imin) / 2 let i = (imax + imin) / 2
@ -456,8 +457,10 @@ function! s:FindClosestSection(toc, fileindices)
let imin = i let imin = i
endif endif
endwhile endwhile
return a:fileindices[file][imin] return a:fileindices[file][imin]
else
return 0
endif
endfunction endfunction
let s:ConvBackPats = map([ let s:ConvBackPats = map([

View File

@ -331,6 +331,24 @@ fun! HtmlIndentGet(lnum)
let ind = ind - 1 let ind = ind - 1
endif 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 if restore_ic == 0
setlocal noic setlocal noic
endif endif