Merge pull request #133 from zegervdv/add-autoref
Add autoref syntax and completion
This commit is contained in:
commit
c3efc48ae0
@ -13,7 +13,7 @@ syntax match texRefZone
|
|||||||
" Add support for cleverref package
|
" Add support for cleverref package
|
||||||
" \Cref, \cref, \cpageref, \labelcref, \labelcpageref
|
" \Cref, \cref, \cpageref, \labelcref, \labelcpageref
|
||||||
syntax region texRefZone matchgroup=texStatement
|
syntax region texRefZone matchgroup=texStatement
|
||||||
\ start="\\\(\(label\)\?c\(page\)\?\|C\)ref{"
|
\ start="\\\(\(label\)\?c\(page\)\?\|C\|auto\)ref{"
|
||||||
\ end="}\|%stopzone\>"
|
\ end="}\|%stopzone\>"
|
||||||
\ contains=@texRefGroup
|
\ contains=@texRefGroup
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ function! vimtex#complete#init(initialized) " {{{1
|
|||||||
call vimtex#util#set_default('g:vimtex_complete_recursive_bib', 0)
|
call vimtex#util#set_default('g:vimtex_complete_recursive_bib', 0)
|
||||||
call vimtex#util#set_default('g:vimtex_complete_patterns',
|
call vimtex#util#set_default('g:vimtex_complete_patterns',
|
||||||
\ {
|
\ {
|
||||||
\ 'ref' : '\C\\v\?\(eq\|page\|[cC]\|labelc\)\?ref\*\?\_\s*{[^{}]*',
|
\ 'ref' : '\C\\v\?\(auto\|eq\|page\|[cC]\|labelc\)\?ref\*\?\_\s*{[^{}]*',
|
||||||
\ 'bib' : '\C\\\a*cite\a*\*\?\(\[[^\]]*\]\)*\_\s*{[^{}]*',
|
\ 'bib' : '\C\\\a*cite\a*\*\?\(\[[^\]]*\]\)*\_\s*{[^{}]*',
|
||||||
\ })
|
\ })
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user