Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
config.vim61 linesDownload Raw Back to syntax
1" Vim syntax file2" Language:		Autoconf M43" Former Maintainer:	Christian Hammesr <ch@lathspell.westend.com>4" Last Change:	2018 Feb 035" 				(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" 				(2025 Sep 14 patch from Damien Lejay to detect unportable +=)9" 				(2025 Sep 18 by Vim Project: fix inconsistent group name)10 11" Well, I actually even do not know much about m4. This explains why there12" is probably very much missing here, yet !13" But I missed good highlighting when editing my GNU autoconf/automake14" script, so I wrote this quick and dirty patch.15 16 17" quit when a syntax file was already loaded18if exists("b:current_syntax")19  finish20endif21 22" define the config syntax23syn match   configdelimiter "[()\[\];,]"24syn match   configoperator  "[=|&\*\+\<\>]"25syn match   configcomment   "\(dnl.*\)\|\(#.*\)" contains=configDnl,@Spell26syn match   configfunction  "\<[A-Z_][A-Z0-9_]*\>"27syn match   confignumber    "[-+]\=\<\d\+\(\.\d*\)\=\>"28syn keyword configDnl   	dnl contained29syn keyword configkeyword   if then else fi test for in do done30syn keyword configspecial   cat rm eval31 32" This shortens the script, see syn-ext-match..33syn region  configstring    start=+\z(["'`]\)+ skip=+\\\z1+ end=+\z1+ contains=@Spell34 35" Anything inside AC_MSG_TYPE([...])  and AC_MSG_TYPE(...) is a string.36syn region  configmsg matchgroup=configfunction start="AC_MSG_[A-Z]*\ze(\[" matchgroup=configdelimiter end="\])" contains=configdelimiter,@Spell37syn region  configmsg matchgroup=configfunction start="AC_MSG_[A-Z]*\ze([^[]" matchgroup=configdelimiter end=")" contains=configdelimiter,@Spell38 39" Help write portable shell code40syn match configPlusEq '\v\+\=' containedin=ALLBUT,configcomment41 42" Define the default highlighting.43" Only when an item doesn't have highlighting yet44 45hi def link configdelimiter Delimiter46hi def link configoperator  Operator47hi def link configcomment   Comment48hi def link configDnl  	 Comment49hi def link configfunction  Function50hi def link confignumber    Number51hi def link configkeyword   Keyword52hi def link configspecial   Special53hi def link configstring    String54hi def link configmsg       String55hi def link configPlusEq    Error56 57 58let b:current_syntax = "config"59 60" vim: ts=461 
codekingpro/portable-devtools · Team Ai