annotate runtime/syntax/config.vim @ 7683:ec434c82f72c v7.4.1140

commit https://github.com/vim/vim/commit/e266d6d664d6d743c79797af400b2c01ec746216 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jan 19 20:51:32 2016 +0100 patch 7.4.1140 Problem: Recognizing <sid> does not work when the language is Turkish. (Christian Brabandt) Solution: Use MB_STNICMP() instead of STNICMP().
author Christian Brabandt <cb@256bit.org>
date Tue, 19 Jan 2016 21:00:07 +0100
parents 198e1e498edf
children 43efa4f5a8ea
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 " define the config syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn match configdelimiter "[()\[\];,]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn match configoperator "[=|&\*\+\<\>]"
6505
198e1e498edf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
25 syn match configcomment "\(dnl.*\)\|\(#.*\)" contains=configDnl,@Spell
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn match configfunction "\<[A-Z_][A-Z0-9_]*\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn match confignumber "[-+]\=\<\d\+\(\.\d*\)\=\>"
6505
198e1e498edf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
28 syn keyword configDnl dnl contained
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn keyword configkeyword if then else fi test for in do done
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn keyword configspecial cat rm eval
6505
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 " This shortens the script, see syn-ext-match..
198e1e498edf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
33 syn region configstring start=+\z(["'`]\)+ skip=+\\\z1+ end=+\z1+ contains=@Spell
198e1e498edf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
34
198e1e498edf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
35 " 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
36 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
37 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
38
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 " For version 5.8 and later: only when an item doesn't have highlighting yet
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 if version >= 508 || !exists("did_config_syntax_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 let did_config_syntax_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 HiLink configdelimiter Delimiter
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 HiLink configoperator Operator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 HiLink configcomment Comment
6505
198e1e498edf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
53 HiLink configDnl Comment
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 HiLink configfunction Function
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 HiLink confignumber Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 HiLink configkeyword Keyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 HiLink configspecial Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 HiLink configstring String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 let b:current_syntax = "config"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 " vim: ts=4