A moderator on Vi & Vim SE recently announced syntax highlighting for lang-vimscript
(seems to be synonymous to lang-vim
) to be working: It looks like lang-vimscript is supported for code highlighting
When we tried out (take a look at the edit history), we noticed some errors, especially regarding comments. Comments in Vimscript start with double quotes "
and are terminated by end of line. What we saw was "zebra highlighting" with every other line highlighted as a string. This is misleading and awkward to read.
A look at page source confirmed every other line marked as hljs-string
.
The situation is the same on SO (and probably any other SE site with syntax highlighting).
There's an issue in highlight.js that was fixed in 2016. When trying with an up-to-date version of highlight.js, Vimscript comments are (mostly) correctly highlighted as hljs-comment
. Somebody must have updated in six years so this can't be it.
There's no lang-vim
or lang-vimscript
in the list of supported languages so I assume whatever we see is not actually highlight.js rendering Vimscript but something else.
What is it? And more importantly, could we just enable highlight.js' vim.js
instead?