From 54eb67ba381ddb7ec58ea0dd4df1c52bb568ff34 Mon Sep 17 00:00:00 2001 From: zegervdv Date: Thu, 12 Mar 2015 09:56:24 +0100 Subject: [PATCH] Add autoref syntax and completion --- after/syntax/tex.vim | 2 +- autoload/vimtex/complete.vim | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/after/syntax/tex.vim b/after/syntax/tex.vim index 879af67..944c4b8 100644 --- a/after/syntax/tex.vim +++ b/after/syntax/tex.vim @@ -13,7 +13,7 @@ syntax match texRefZone " Add support for cleverref package " \Cref, \cref, \cpageref, \labelcref, \labelcpageref syntax region texRefZone matchgroup=texStatement - \ start="\\\(\(label\)\?c\(page\)\?\|C\)ref{" + \ start="\\\(\(label\)\?c\(page\)\?\|C\|auto\)ref{" \ end="}\|%stopzone\>" \ contains=@texRefGroup diff --git a/autoload/vimtex/complete.vim b/autoload/vimtex/complete.vim index dec36ab..43ba15e 100644 --- a/autoload/vimtex/complete.vim +++ b/autoload/vimtex/complete.vim @@ -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_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*{[^{}]*', \ })