I'm trying to conceal the LaTeX command \footnote{} in a .tex file and show a bullet point instead. This works mostly fine, but when there is a \cite{} command inside the footnote, everything but the bibkey between curly brackets is concealed.

In other words this

\footnote{Some text.\cite{bibkey} And more text.}

becomes this

• {bibkey}••

Here is what I have put in my after/syntax/tex.vim

syntax region texFnZone matchgroup=texFnZoneDelim start="\\footnote{" end="}" contains=texStatement,texCite containedin=texChapterZone,texSectionZone,texSubSectionZone,texSubSubSectionZone,texParaZone,texSubParaZone conceal cchar=•
highlight def link texFnZone Todo
highlight def link texFnZoneDelim Todo

Question: how can I also conceal the curly brackets with the bibkey inside them?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.