Merge pull request #133 from zegervdv/add-autoref

Add autoref syntax and completion
This commit is contained in:
Karl Yngve Lervåg 2015-03-12 12:23:53 +01:00
commit c3efc48ae0
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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*{[^{}]*',
\ }) \ })