1" Vim syntax file 2" Language: configure.in script: M4 with sh 3" Former Maintainer: Christian Hammesr <[email protected]> 4" Last Change: 2018 Feb 03 5" (patch from Yngve Inntjore Levinsen to detect AC_MSG) 6" (patch from Khym Chanur to add @Spell) 7" (patch from James McCoy to fix paren matching) 8 9" Well, I actually even do not know much about m4. This explains why there 10" is probably very much missing here, yet ! 11" But I missed good highlighting when editing my GNU autoconf/automake 12" script, so I wrote this quick and dirty patch. 13 14 15" quit when a syntax file was already loaded 16if exists("b:current_syntax") 17 finish 18endif 19 20" define the config syntax 21syn match configdelimiter "[()\[\];,]" 22syn match configoperator "[=|&\*\+\<\>]" 23syn match configcomment "\(dnl.*\)\|\(#.*\)" contains=configDnl,@Spell 24syn match configfunction "\<[A-Z_][A-Z0-9_]*\>" 25syn match confignumber "[-+]\=\<\d\+\(\.\d*\)\=\>" 26syn keyword configDnl dnl contained 27syn keyword configkeyword if then else fi test for in do done 28syn keyword configspecial cat rm eval 29 30" This shortens the script, see syn-ext-match.. 31syn region configstring start=+\z(["'`]\)+ skip=+\\\z1+ end=+\z1+ contains=@Spell 32 33" Anything inside AC_MSG_TYPE([...]) and AC_MSG_TYPE(...) is a string. 34syn region configmsg matchgroup=configfunction start="AC_MSG_[A-Z]*\ze(\[" matchgroup=configdelimiter end="\])" contains=configdelimiter,@Spell 35syn region configmsg matchgroup=configfunction start="AC_MSG_[A-Z]*\ze([^[]" matchgroup=configdelimiter end=")" contains=configdelimiter,@Spell 36 37" Define the default highlighting. 38" Only when an item doesn't have highlighting yet 39 40hi def link configdelimiter Delimiter 41hi def link configoperator Operator 42hi def link configcomment Comment 43hi def link configDnl Comment 44hi def link configfunction Function 45hi def link confignumber Number 46hi def link configkeyword Keyword 47hi def link configspecial Special 48hi def link configstring String 49hi def link configmsg String 50 51 52let b:current_syntax = "config" 53 54" vim: ts=4 55