Update coffee, html and latex
This commit is contained in:
parent
04e6a8a73c
commit
e9d8c39608
@ -27,8 +27,8 @@ function! s:GetMakePrg()
|
||||
\ ' -c' .
|
||||
\ ' ' . b:coffee_litcoffee .
|
||||
\ ' ' . g:coffee_make_options .
|
||||
\ ' ' . fnameescape(expand('%')) .
|
||||
\ ' $*'
|
||||
\ ' $*' .
|
||||
\ ' ' . fnameescape(expand('%'))
|
||||
endfunction
|
||||
|
||||
" Set `makeprg` and return 1 if coffee is still the compiler, else return 0.
|
||||
|
@ -312,7 +312,7 @@ function! s:ReadTOC(auxfile, texfile, ...)
|
||||
if included != ''
|
||||
" append the input TOX to `toc` and `fileindices`
|
||||
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)
|
||||
continue
|
||||
endif
|
||||
@ -441,23 +441,26 @@ function! s:FindClosestSection(toc, fileindices)
|
||||
endif
|
||||
|
||||
let imax = len(a:fileindices[file])
|
||||
let imin = 0
|
||||
while imin < imax - 1
|
||||
let i = (imax + imin) / 2
|
||||
let tocindex = a:fileindices[file][i]
|
||||
let entry = a:toc[tocindex]
|
||||
let titlestr = entry['text']
|
||||
let titlestr = escape(titlestr, '\')
|
||||
let titlestr = substitute(titlestr, ' ', '\\_\\s\\+', 'g')
|
||||
let [lnum, cnum] = searchpos('\\' . entry['level'] . '\_\s*{' . titlestr . '}', 'nW')
|
||||
if lnum
|
||||
let imax = i
|
||||
else
|
||||
let imin = i
|
||||
endif
|
||||
endwhile
|
||||
|
||||
return a:fileindices[file][imin]
|
||||
if imax > 0
|
||||
let imin = 0
|
||||
while imin < imax - 1
|
||||
let i = (imax + imin) / 2
|
||||
let tocindex = a:fileindices[file][i]
|
||||
let entry = a:toc[tocindex]
|
||||
let titlestr = entry['text']
|
||||
let titlestr = escape(titlestr, '\')
|
||||
let titlestr = substitute(titlestr, ' ', '\\_\\s\\+', 'g')
|
||||
let [lnum, cnum] = searchpos('\\' . entry['level'] . '\_\s*{' . titlestr . '}', 'nW')
|
||||
if lnum
|
||||
let imax = i
|
||||
else
|
||||
let imin = i
|
||||
endif
|
||||
endwhile
|
||||
return a:fileindices[file][imin]
|
||||
else
|
||||
return 0
|
||||
endif
|
||||
endfunction
|
||||
|
||||
let s:ConvBackPats = map([
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user