Mercurial > vim
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 |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: configure.in script: M4 with sh | |
3 " Maintainer: Christian Hammesr <ch@lathspell.westend.com> | |
6505 | 4 " Last Change: 2015 Jan 14 |
5 " (patch from Yngve Inntjore Levinsen to detect AC_MSG) | |
6 " (patch from Khym Chanur to add @Spell) | |
7 | 7 |
8 " Well, I actually even do not know much about m4. This explains why there | |
9 " is probably very much missing here, yet ! | |
6505 | 10 " But I missed good highlighting when editing my GNU autoconf/automake |
7 | 11 " script, so I wrote this quick and dirty patch. |
12 | |
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 | 16 finish |
17 endif | |
18 | |
19 " define the config syntax | |
20 syn match configdelimiter "[()\[\];,]" | |
21 syn match configoperator "[=|&\*\+\<\>]" | |
6505 | 22 syn match configcomment "\(dnl.*\)\|\(#.*\)" contains=configDnl,@Spell |
7 | 23 syn match configfunction "\<[A-Z_][A-Z0-9_]*\>" |
24 syn match confignumber "[-+]\=\<\d\+\(\.\d*\)\=\>" | |
6505 | 25 syn keyword configDnl dnl contained |
7 | 26 syn keyword configkeyword if then else fi test for in do done |
27 syn keyword configspecial cat rm eval | |
6505 | 28 |
29 " This shortens the script, see syn-ext-match.. | |
30 syn region configstring start=+\z(["'`]\)+ skip=+\\\z1+ end=+\z1+ contains=@Spell | |
31 | |
32 " Anything inside AC_MSG_TYPE([...]) and AC_MSG_TYPE(...) is a string. | |
33 syn region configstring matchgroup=configfunction start="AC_MSG_[A-Z]*\ze(\[" matchgroup=configdelimiter end="\])" contains=configdelimiter,@Spell | |
34 syn region configstring matchgroup=configfunction start="AC_MSG_[A-Z]*\ze([^[]" matchgroup=configdelimiter end=")" contains=configdelimiter,@Spell | |
7 | 35 |
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 | 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 | 49 |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
6505
diff
changeset
|
50 delcommand HiLink |
7 | 51 |
52 let b:current_syntax = "config" | |
53 | |
54 " vim: ts=4 |