From 843ff977de488555d0587eb704817101674ee908 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Yngve=20Lerv=C3=A5g?= Date: Mon, 29 Jan 2024 11:17:34 +0100 Subject: [PATCH] fix(syntax): add missing biblatex \Cite refer: #2875 --- autoload/vimtex/syntax/p/biblatex.vim | 2 ++ test/test-syntax/test-biblatex.tex | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/autoload/vimtex/syntax/p/biblatex.vim b/autoload/vimtex/syntax/p/biblatex.vim index e3a5455552..1315545e42 100644 --- a/autoload/vimtex/syntax/p/biblatex.vim +++ b/autoload/vimtex/syntax/p/biblatex.vim @@ -8,6 +8,7 @@ function! vimtex#syntax#p#biblatex#load(cfg) abort " {{{1 syntax match texCmdBib nextgroup=texFilesArg "\\addbibresource\>" syntax match texCmdRef nextgroup=texRefOpt,texRefArg skipwhite skipnl "\\bibentry\>" + syntax match texCmdRef nextgroup=texRefOpt,texRefArg skipwhite skipnl "\\Cite\>\*\?" syntax match texCmdRef nextgroup=texRefOpt,texRefArg skipwhite skipnl "\\cite[pt]\?\>\*\?" syntax match texCmdRef nextgroup=texRefOpt,texRefArg skipwhite skipnl "\\citeal[tp]\>\*\?" syntax match texCmdRef nextgroup=texRefOpt,texRefArg skipwhite skipnl "\\cite\%(num\|text\|url\)\>" @@ -48,6 +49,7 @@ function! vimtex#syntax#p#biblatex#load(cfg) abort " {{{1 \ '[Ppf]?[Nn]otecite', \ '[pPfFsStTaA]?[Vv]olcite[s]?', \ '[Ss]upercite[s]?', + \ 'Cite', \ 'cite%(num|text|url|field|list|name)', \ 'citeal[tp]', \ 'foot%(full)?cite%(text)?', diff --git a/test/test-syntax/test-biblatex.tex b/test/test-syntax/test-biblatex.tex index 1a08d04ae0..b9e78410ca 100644 --- a/test/test-syntax/test-biblatex.tex +++ b/test/test-syntax/test-biblatex.tex @@ -2,6 +2,7 @@ \usepackage{biblatex} \usepackage{csquotes} +% \addbibresource{biblatex-examples.bib} \addbibresource{../common/local1.bib} \begin{document} @@ -17,7 +18,8 @@ \smartcite{} \Textcite[e.g.][]{} -\cite{} +\cite{fooBar} +\Cite{fooBar} \citealp*{} \citealp{} \citealt*{} @@ -32,4 +34,7 @@ \citeyear{} \citeyearpar{} +\volcite{1}[23]{worman} +\volcite[23]{worman} + \end{document}