vim-pandoc-syntax
vim-pandoc-syntax copied to clipboard
Please add option to disable math highlighting
I'm a Humanities guy, never do math typesetting and disable math related Pandoc extensions in my pandoc wrapper script, and I guess I'm not the only one. When you don't do math blocks of text going Special because you type a $
or \(
is just plain annoying. I thought I could just set hi clear pandocLaTeXInlineMath
in after/syntax/pandoc.vim
, but the contained LaTeX higlighting, with the group texMathZoneV still makes the regions in question Special, and also clearing the texMathZoneV group doesn't have the desired effect. Setting pandocLaTeXInlineMath to Normal also is not quite what I want, since I still want emphasis etc. to be highlighted normally. Thus I wish there were an option variable (and whatever is needed to make it work) to turn off math highlighting inside Markdown, possibly either buffer locally or globally for those who only do math sometimes.
Seconding this. Having to escape dollar signs is more irritating than it sounds like it should be. I managed to disable the highlighting by deleting lines 213-225, but I've no idea if that has side effects and I don't know how to do it "correctly."
Has anyone figured out how to achieve this through a configuration without having to directly remove those lines of code that @andrew-vant mentioned above?
The execution of the code which enables math highlighting could certainly be made conditional dependent on the value of some variable, but to get it done takes that someone who is familiar with the code finds the issue important enough to do something about it, or that someone who finds the issue important familiarizes themself with the code enough to do something about it, neither of which seems to have happened yet, since the issue is still open.
I'm working on this in #378. Right now I've only implemented the inlinemath
blacklist option which solves the issue of having to escape normal dollar signs. Not sure if that would close this issue completely, but it makes some progress!