The vim.vim syntax file applies vim9CommentTitle highlight group to an "E", then 1-4 numbers, then colon comment when it is a standalone comment. That makes for odd highlighting in Vim9 script where the comment is about an error code. The following screenshots show current and after:
image.png (view on web)
image.png (view on web)
This change shouldn’t impact any other vim9CommentTitle patterns, though if there is a better way, all good.
https://github.com/vim/vim/pull/19390
(1 file)
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
The routine for submitting changes to runtime/syntax/vim.vim
is somewhat roundabout on account of code generation:
cd runtime/syntax/generator # MAKE MANUAL CHANGES TO THIS FILE. vim vim.vim.base make git add ../vim.vim vim.vim.base cd .. make clean vim test
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
The routine for submitting changes to
runtime/syntax/vim.vimis somewhat roundabout on account of code generation:
Sorry, I didn't realise, though my mistake in not noticing the warning at the top of runtime/syntax/vim.vim.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@kennypete pushed 1 commit.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
thanks, can you add a syntax test for this please? I'd guess this needs to go to runtime/syntax/testdir/input/vim_comments.vim and then you'd need to re-generate the dump files:
cd runtime/syntax
make
The syntax test will then fail with your new changes. Please inspect the failed dump file (using the command mentioned in the output viewdumps.vim) make sure it fits your purpose and then just update the dump file please.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@kennypete pushed 1 commit.
You are receiving this because you are subscribed to this thread.![]()
thanks, can you add a syntax test for this please? I'd guess this needs to go to
runtime/syntax/testdir/input/vim_comments.vimand then you'd need to re-generate the dump files:cd runtime/syntax makeThe syntax test will then fail with your new changes. Please inspect the failed dump file (using the command mentioned in the output
viewdumps.vim) make sure it fits your purpose and then just update the dump file please.
There were two files needing the syntax test (vim9_comments.vim is the main one for any whole-line comments), though with Vim9 script scope in legacy Vim script :def functions, vim_comments.vim also needed the test. It all looks fine, I think, the dumps are updated, and 'pass' on re-make.
"Adjusting a syntax plugin test" in runtime/syntax/testdir/README.txt was helpful. Hopefully I haven't missed anything - it was slightly nerve-racking, though educational.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()