From 4e39b1337df0fc5d029f97c693035c0c8110c6b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Yngve=20Lerv=C3=A5g?= Date: Wed, 14 Sep 2016 23:02:57 +0200 Subject: [PATCH] Fixed #554: Wrong syntax highlighting of \cite[pt] --- after/syntax/tex.vim | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/after/syntax/tex.vim b/after/syntax/tex.vim index 6415522..a3f126c 100644 --- a/after/syntax/tex.vim +++ b/after/syntax/tex.vim @@ -65,12 +65,6 @@ highlight link texHyperref texRefZone " }}}1 " {{{1 Improve support for cite commands if get(g:, 'tex_fast', 'r') =~# 'r' - " - " natbib - " - syntax match texStatement '\\cite\%([tp]\*\?\)\?' - \ nextgroup=texRefOption,texCite - " " biblatex " @@ -104,6 +98,15 @@ if get(g:, 'tex_fast', 'r') =~# 'r' execute 'syntax match texStatement /\\cite\%(field\|list\|name\)/' \ 'nextgroup=texRefOptions,texCites' + " + " natbib + " + syntax match texStatement '\\cite\%([tp]\*\?\)\?' + \ nextgroup=texRefOption,texCite + + " + " Common + " syntax region texRefOptions contained matchgroup=Delimiter \ start='\[' end=']' \ contains=@texRefGroup,texRefZone