This commit is contained in:
Adam Stankiewicz
2020-05-20 16:59:09 +02:00
parent 0a7c62b3b2
commit a688c66a04
30 changed files with 276 additions and 152 deletions

View File

@@ -354,7 +354,8 @@ function! s:toc.set_syntax() abort dict "{{{1
syntax match VimtexTocNum /\v(([A-Z]+>|\d+)(\.\d+)*)?\s*/ contained
execute 'syntax match VimtexTocTodo'
\ '/\v\s\zs%(' . toupper(join(g:vimtex_toc_todo_keywords, '|')) . '): /'
\ '/\v\s\zs%('
\ . toupper(join(keys(g:vimtex_toc_todo_labels), '|')) . '): /'
\ 'contained'
syntax match VimtexTocHotkey /\[[^]]\+\]/ contained
@@ -751,7 +752,7 @@ endfunction
function! s:foldtext() abort " {{{1
let l:line = getline(v:foldstart)[3:]
if b:toc.todo_sorted
\ && l:line =~# '\v%(' . join(g:vimtex_toc_todo_keywords, '|') . ')'
\ && l:line =~# '\v%(' . join(keys(g:vimtex_toc_todo_labels), '|') . ')'
return substitute(l:line, '\w+\zs:.*', 's', '')
else
return l:line