patch 9.1.0616: filetype: Make syntax highlighting off for MS Makefiles

Problem:  filetype: Make syntax highlighting off for MS Makefiles
Solution: Try to detect MS Makefiles and adjust syntax rules to it.
          (Ken Takata)

Highlighting of variable expansion in Microsoft Makefile can be broken.
E.g.:
2979cfc262/src/Make_mvc.mak (L1331)

Don't use backslash as escape characters if `make_microsoft` is set.
Also fix that `make_no_comments` was not considered if `make_microsoft`
was set.

Also add description for `make_microsoft` and `make_no_comments` to the
documentation and include a very simple filetype test

closes: #15341

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Ken Takata <kentkt@csc.jp>
This commit is contained in:
Ken Takata
2024-07-25 21:07:13 +02:00
committed by Christian Brabandt
parent 242667ae14
commit eb4b903c9b
6 changed files with 65 additions and 10 deletions

View File

@ -1,4 +1,4 @@
*syntax.txt* For Vim version 9.1. Last change: 2024 Jul 23
*syntax.txt* For Vim version 9.1. Last change: 2024 Jul 25
VIM REFERENCE MANUAL by Bram Moolenaar
@ -2278,7 +2278,7 @@ By default mail.vim synchronises syntax to 100 lines before the first
displayed line. If you have a slow machine, and generally deal with emails
with short headers, you can change this to a smaller value: >
:let mail_minlines = 30
:let mail_minlines = 30
MAKE *make.vim* *ft-make-syntax*
@ -2289,6 +2289,16 @@ feature off by using: >
:let make_no_commands = 1
Comments are also highlighted by default. You can turn this off by using: >
:let make_no_comments = 1
Microsoft Makefile handles variable expansion and comments differently
(backslashes are not used for escape). If you see any wrong highlights
because of this, you can try this: >
:let make_microsoft = 1
MAPLE *maple.vim* *ft-maple-syntax*