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