annotate runtime/syntax/config.vim @ 19345:c221e35656dc

Added tag v8.2.0230 for changeset 77794a1d7e98d9b8dc0fe8f44c9d33a533fe9ac5
author Bram Moolenaar <Bram@vim.org>
date Fri, 07 Feb 2020 22:30:04 +0100
parents 167a030448fa
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: configure.in script: M4 with sh
13231
167a030448fa Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
3 " Former Maintainer: Christian Hammesr <ch@lathspell.westend.com>
167a030448fa Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
4 " Last Change: 2018 Feb 03
6505
198e1e498edf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
5 " (patch from Yngve Inntjore Levinsen to detect AC_MSG)
198e1e498edf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
6 " (patch from Khym Chanur to add @Spell)
13231
167a030448fa Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
7 " (patch from James McCoy to fix paren matching)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 " Well, I actually even do not know much about m4. This explains why there
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 " is probably very much missing here, yet !
6505
198e1e498edf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
11 " But I missed good highlighting when editing my GNU autoconf/automake
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 " script, so I wrote this quick and dirty patch.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 " define the config syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn match configdelimiter "[()\[\];,]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn match configoperator "[=|&\*\+\<\>]"
6505
198e1e498edf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
23 syn match configcomment "\(dnl.*\)\|\(#.*\)" contains=configDnl,@Spell
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn match configfunction "\<[A-Z_][A-Z0-9_]*\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn match confignumber "[-+]\=\<\d\+\(\.\d*\)\=\>"
6505
198e1e498edf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
26 syn keyword configDnl dnl contained
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn keyword configkeyword if then else fi test for in do done
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn keyword configspecial cat rm eval
6505
198e1e498edf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
29
198e1e498edf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
30 " This shortens the script, see syn-ext-match..
198e1e498edf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
31 syn region configstring start=+\z(["'`]\)+ skip=+\\\z1+ end=+\z1+ contains=@Spell
198e1e498edf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
32
198e1e498edf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
33 " Anything inside AC_MSG_TYPE([...]) and AC_MSG_TYPE(...) is a string.
13231
167a030448fa Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
34 syn region configmsg matchgroup=configfunction start="AC_MSG_[A-Z]*\ze(\[" matchgroup=configdelimiter end="\])" contains=configdelimiter,@Spell
167a030448fa Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
35 syn region configmsg matchgroup=configfunction start="AC_MSG_[A-Z]*\ze([^[]" matchgroup=configdelimiter end=")" contains=configdelimiter,@Spell
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
167a030448fa Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
49 hi def link configmsg String
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 let b:current_syntax = "config"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 " vim: ts=4