forked from aniani/vim
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:
committed by
Christian Brabandt
parent
242667ae14
commit
eb4b903c9b
@@ -2646,4 +2646,21 @@ func Test_pl_file()
|
||||
filetype off
|
||||
endfunc
|
||||
|
||||
func Test_make_file()
|
||||
filetype on
|
||||
|
||||
" Microsoft Makefile
|
||||
call writefile(['# Makefile for Windows', '!if "$(VIMDLL)" == "yes"'], 'XMakefile.mak', 'D')
|
||||
split XMakefile.mak
|
||||
call assert_equal(1, get(b:, 'make_microsoft', 0))
|
||||
bwipe!
|
||||
|
||||
call writefile(['# get the list of tests', 'include testdir/Make_all.mak'], 'XMakefile.mak', 'D')
|
||||
split XMakefile.mak
|
||||
call assert_equal(0, get(b:, 'make_microsoft', 0))
|
||||
bwipe!
|
||||
|
||||
filetype off
|
||||
endfunc
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
|
||||
Reference in New Issue
Block a user