vim-pandoc / vim-pandoc-syntax

pandoc markdown syntax, to be installed alongside vim-pandoc
MIT License
424 stars 61 forks source link

Broken syntax highlighting for latex `\citeauthor` #311

Open lassepe opened 4 years ago

lassepe commented 4 years ago

Syntax highlighting for \citeauthor only highlights "\cite" but not the author part of the command:

image

alerque commented 4 years ago

Believe it or not, this actually seems to be an issue in VIM's TeX module, not ours. When we see anything that even looks like a TeX command, we pass that section of text off to syntax/tex.vim for highlighting. It's that code that is handling known vs. unknown commands differently, and giving some special treatment. Adding the \citeauthor command (and correcting the general syntax bug around it matching part of a word that TeX itself would not parse separately becuase there is no token break point) is something that will have to be fixed in VIM itself where that syntax file is hosted.

Trying to monkey patch it on this end would involved taking over its job as well as ours, and we have enough monkeys in our circus!

I'm happy to keep this issue open as well, but @lassepe would you please report this as an issue on vim/vim? Thanks!

You might note in also picks up \citep from \citepfoobar in a similar way.

lassepe commented 4 years ago

Thank you for your quick response. I filed https://github.com/vim/vim/issues/5529