annotate runtime/syntax/config.vim @ 10048:43efa4f5a8ea

commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Aug 30 23:26:57 2016 +0200 Updated runtime files. Remove version checks for Vim older than 6.0.
author Christian Brabandt <cb@256bit.org>
date Tue, 30 Aug 2016 23:30:09 +0200
parents 198e1e498edf
children 46763b01cd9a
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Christian Hammesr <ch@lathspell.westend.com>
6505
198e1e498edf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
4 " Last Change: 2015 Jan 14
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)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " Well, I actually even do not know much about m4. This explains why there
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 " is probably very much missing here, yet !
6505
198e1e498edf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
10 " But I missed good highlighting when editing my GNU autoconf/automake
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 " script, so I wrote this quick and dirty patch.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 6505
diff changeset
14 " 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
15 if exists("b:current_syntax")
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 " define the config syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 syn match configdelimiter "[()\[\];,]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn match configoperator "[=|&\*\+\<\>]"
6505
198e1e498edf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
22 syn match configcomment "\(dnl.*\)\|\(#.*\)" contains=configDnl,@Spell
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn match configfunction "\<[A-Z_][A-Z0-9_]*\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn match confignumber "[-+]\=\<\d\+\(\.\d*\)\=\>"
6505
198e1e498edf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
25 syn keyword configDnl dnl contained
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn keyword configkeyword if then else fi test for in do done
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn keyword configspecial cat rm eval
6505
198e1e498edf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
28
198e1e498edf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
29 " This shortens the script, see syn-ext-match..
198e1e498edf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
30 syn region configstring start=+\z(["'`]\)+ skip=+\\\z1+ end=+\z1+ contains=@Spell
198e1e498edf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
31
198e1e498edf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
32 " Anything inside AC_MSG_TYPE([...]) and AC_MSG_TYPE(...) is a string.
198e1e498edf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
33 syn region configstring matchgroup=configfunction start="AC_MSG_[A-Z]*\ze(\[" matchgroup=configdelimiter end="\])" contains=configdelimiter,@Spell
198e1e498edf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
34 syn region configstring 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
35
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 " Define the default highlighting.
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 6505
diff changeset
37 " Only when an item doesn't have highlighting yet
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 6505
diff changeset
38 command -nargs=+ HiLink hi def link <args>
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 6505
diff changeset
40 HiLink configdelimiter Delimiter
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 6505
diff changeset
41 HiLink configoperator Operator
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 6505
diff changeset
42 HiLink configcomment Comment
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 6505
diff changeset
43 HiLink configDnl Comment
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 6505
diff changeset
44 HiLink configfunction Function
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 6505
diff changeset
45 HiLink confignumber Number
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 6505
diff changeset
46 HiLink configkeyword Keyword
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 6505
diff changeset
47 HiLink configspecial Special
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 6505
diff changeset
48 HiLink configstring String
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 6505
diff changeset
50 delcommand HiLink
7
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