[vim/vim] runtime/syntax/make: highlights in define..undef block (PR #18403)

5 views
Skip to first unread message

littlewu2508

unread,
Sep 26, 2025, 5:09:13 AM (4 days ago) Sep 26
to vim/vim, Subscribed

Previously contents in makeDefine are nearly highlighted as Define, so comments and targets shares the same color as Define, making it hard to distinguish if someone write large block of targets-recipes as defined function.

Such scenario is common in building data analysis pipeline. Recipes are reused and targets may have multiple variables, and a single % implicit rule is not enough.


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/18403

Commit Summary

  • c61f9ec Syntax highlights inside makeDefine
  • 346a872 Move makeIdent syn match before region

File Changes

(1 file)

Patch Links:


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18403@github.com>

Christian Brabandt

unread,
Sep 26, 2025, 11:50:18 AM (4 days ago) Sep 26
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#18403)

Thanks, let's try to ping @rohieb


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18403/c3339307047@github.com>

Roland Hieber

unread,
Sep 26, 2025, 1:16:54 PM (4 days ago) Sep 26
to vim/vim, Subscribed

@rohieb commented on this pull request.

I'm not completely sure what you are trying to achieve. Do you have an example Makefile that illustrates your change?


In runtime/syntax/make.vim:

>  endif
-syn match makeIdent	"\$\$\w*"

I don't see why you moved this around to the top unneccessarily…


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18403/review/3273127527@github.com>

littlewu2508

unread,
Sep 26, 2025, 10:27:14 PM (4 days ago) Sep 26
to vim/vim, Push

@littlewu2508 pushed 2 commits.

  • 7d92f6f Syntax highlights inside makeDefine
  • ef73bb8 Move makeIdent syn match before region


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18403/before/346a87223d3eefa07fda9c5b04b28cf6f6f81949/after/ef73bb86e7ebbc5b5cd25b1fa5410beb249f80ad@github.com>

littlewu2508

unread,
Sep 27, 2025, 12:32:53 AM (4 days ago) Sep 27
to vim/vim, Subscribed
littlewu2508 left a comment (vim/vim#18403)

I'm not completely sure what you are trying to achieve. Do you have an example Makefile that illustrates your change?

Here's my example at work on vim 9.1.1652 (which has same syntax/make.vim as master)

vimold.png (view on web)

And with these patches:

vimnew.png (view on web)

If I didn't move those syn match makeIdent "\$\$\w*" around, it will behave like

vimnew.png (view on web)

Where $$(PJRUN) has only $$ highlighted as makeIdent, I guess this is because syn match makeIdent "\$\$\w*" and syn match makeIdent "\$[^({]" has higher priority to match $$ , just moving this two rule in the front is also OK.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18403/c3341161566@github.com>

littlewu2508

unread,
Sep 27, 2025, 6:27:50 AM (3 days ago) Sep 27
to vim/vim, Subscribed
littlewu2508 left a comment (vim/vim#18403)

Here's my example at work on vim 9.1.1652 (which has same syntax/make.vim as master)

My makefile is
salt.mk.gz


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18403/c3341485301@github.com>

littlewu2508

unread,
7:11 AM (8 hours ago) 7:11 AM
to vim/vim, Subscribed

@littlewu2508 commented on this pull request.


In runtime/syntax/make.vim:

>  endif
-syn match makeIdent	"\$\$\w*"

Hi @rohieb, thank you for the comments! Please see my response below and further review.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18403/review/3284081428@github.com>

Reply all
Reply to author
Forward
0 new messages