annotate runtime/syntax/xdefaults.vim @ 11988:d12a5403adcb

Added tag v8.0.0874 for changeset f2cf5698a93fcbbfd5648c98bc61aafff5e3baab
author Christian Brabandt <cb@256bit.org>
date Sat, 05 Aug 2017 21:15:04 +0200
parents 46763b01cd9a
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: X resources files like ~/.Xdefaults (xrdb)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Johannes Zellner <johannes@zellner.org>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Author and previous maintainer:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 " Gautam H. Mudunuri <gmudunur@informatica.com>
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 7
diff changeset
6 " Last Change: Di, 09 Mai 2006 23:10:23 CEST
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1121
diff changeset
7 " $Id: xdefaults.vim,v 1.2 2007/05/05 17:19:40 vimboss Exp $
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 " REFERENCES:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 " xrdb manual page
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 " xrdb source: ftp://ftp.x.org/pub/R6.4/xc/programs/xrdb/xrdb.c
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 3513
diff changeset
13 " quit when a syntax file was already loaded
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 3513
diff changeset
14 if exists("b:current_syntax")
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 " turn case on
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 if !exists("xdefaults_no_colon_errors")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 " mark lines which do not contain a colon as errors.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 " This does not really catch all errors but only lines
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 " which contain at least two WORDS and no colon. This
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 " was done this way so that a line is not marked as
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 " error while typing (which would be annoying).
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syntax match xdefaultsErrorLine "^\s*[a-zA-Z.*]\+\s\+[^: ]\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 " syn region xdefaultsLabel start=+^[^:]\{-}:+he=e-1 skip=+\\+ end="$"
3513
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
33 syn match xdefaultsLabel +^[^:]\{-}:+he=e-1 contains=xdefaultsPunct,xdefaultsSpecial,xdefaultsLineEnd
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn region xdefaultsValue keepend start=+:+lc=1 skip=+\\+ end=+$+ contains=xdefaultsSpecial,xdefaultsLabel,xdefaultsLineEnd
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn match xdefaultsSpecial contained +#override+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn match xdefaultsSpecial contained +#augment+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn match xdefaultsPunct contained +[.*:]+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn match xdefaultsLineEnd contained +\\$+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn match xdefaultsLineEnd contained +\\n\\$+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn match xdefaultsLineEnd contained +\\n$+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 " COMMENTS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 " note, that the '!' must be at the very first position of the line
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 7
diff changeset
48 syn match xdefaultsComment "^!.*$" contains=xdefaultsTodo,@Spell
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 " lines starting with a '#' mark and which are not preprocessor
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 " lines are skipped. This is not part of the xrdb documentation.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 " It was reported by Bram Moolenaar and could be confirmed by
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 " having a look at xrdb.c:GetEntries()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 syn match xdefaultsCommentH "^#.*$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 "syn region xdefaultsComment start="^#" end="$" keepend contains=ALL
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 7
diff changeset
56 syn region xdefaultsComment start="/\*" end="\*/" contains=xdefaultsTodo,@Spell
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syntax match xdefaultsCommentError "\*/"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 syn keyword xdefaultsTodo contained TODO FIXME XXX display
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 " PREPROCESSOR STUFF
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 syn region xdefaultsPreProc start="^\s*#\s*\(if\|ifdef\|ifndef\|elif\|else\|endif\)\>" skip="\\$" end="$" contains=xdefaultsSymbol
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 if !exists("xdefaults_no_if0")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 syn region xdefaultsCppOut start="^\s*#\s*if\s\+0\>" end=".\|$" contains=xdefaultsCppOut2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 syn region xdefaultsCppOut2 contained start="0" end="^\s*#\s*\(endif\>\|else\>\|elif\>\)" contains=xdefaultsCppSkip
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 syn region xdefaultsCppSkip contained start="^\s*#\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*#\s*endif\>" contains=xdefaultsCppSkip
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 syn region xdefaultsIncluded contained start=+"+ skip=+\\\\\|\\"+ end=+"+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 syn match xdefaultsIncluded contained "<[^>]*>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 syn match xdefaultsInclude "^\s*#\s*include\>\s*["<]" contains=xdefaultsIncluded
3513
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
75 syn cluster xdefaultsPreProcGroup contains=xdefaultsPreProc,xdefaultsIncluded,xdefaultsInclude,xdefaultsDefine,xdefaultsCppOut,xdefaultsCppOut2,xdefaultsCppSkip
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
76 syn region xdefaultsDefine start="^\s*#\s*\(define\|undef\)\>" skip="\\$" end="$" contains=ALLBUT,@xdefaultsPreProcGroup,xdefaultsCommentH,xdefaultsErrorLine,xdefaultsLabel,xdefaultsValue
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
77 syn region xdefaultsPreProc start="^\s*#\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@xdefaultsPreProcGroup,xdefaultsCommentH,xdefaultsErrorLine,xdefaultsLabel,xdefaultsValue
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 " symbols as defined by xrdb
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 syn keyword xdefaultsSymbol contained SERVERHOST
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 syn match xdefaultsSymbol contained "SRVR_[a-zA-Z0-9_]\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 syn keyword xdefaultsSymbol contained HOST
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 syn keyword xdefaultsSymbol contained DISPLAY_NUM
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 syn keyword xdefaultsSymbol contained CLIENTHOST
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 syn match xdefaultsSymbol contained "CLNT_[a-zA-Z0-9_]\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 syn keyword xdefaultsSymbol contained RELEASE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 syn keyword xdefaultsSymbol contained REVISION
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 syn keyword xdefaultsSymbol contained VERSION
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 syn keyword xdefaultsSymbol contained VENDOR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 syn match xdefaultsSymbol contained "VNDR_[a-zA-Z0-9_]\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 syn match xdefaultsSymbol contained "EXT_[a-zA-Z0-9_]\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 syn keyword xdefaultsSymbol contained NUM_SCREENS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 syn keyword xdefaultsSymbol contained SCREEN_NUM
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 syn keyword xdefaultsSymbol contained BITS_PER_RGB
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 syn keyword xdefaultsSymbol contained CLASS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 syn keyword xdefaultsSymbol contained StaticGray GrayScale StaticColor PseudoColor TrueColor DirectColor
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 syn match xdefaultsSymbol contained "CLASS_\(StaticGray\|GrayScale\|StaticColor\|PseudoColor\|TrueColor\|DirectColor\)"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 syn keyword xdefaultsSymbol contained COLOR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 syn match xdefaultsSymbol contained "CLASS_\(StaticGray\|GrayScale\|StaticColor\|PseudoColor\|TrueColor\|DirectColor\)_[0-9]\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 syn keyword xdefaultsSymbol contained HEIGHT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 syn keyword xdefaultsSymbol contained WIDTH
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 syn keyword xdefaultsSymbol contained PLANES
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 syn keyword xdefaultsSymbol contained X_RESOLUTION
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 syn keyword xdefaultsSymbol contained Y_RESOLUTION
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 " Define the default highlighting.
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 3513
diff changeset
109 " Only when an item doesn't have highlighting yet
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
110 hi def link xdefaultsLabel Type
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
111 hi def link xdefaultsValue Constant
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
112 hi def link xdefaultsComment Comment
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
113 hi def link xdefaultsCommentH xdefaultsComment
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
114 hi def link xdefaultsPreProc PreProc
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
115 hi def link xdefaultsInclude xdefaultsPreProc
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
116 hi def link xdefaultsCppSkip xdefaultsCppOut
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
117 hi def link xdefaultsCppOut2 xdefaultsCppOut
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
118 hi def link xdefaultsCppOut Comment
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
119 hi def link xdefaultsIncluded String
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
120 hi def link xdefaultsDefine Macro
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
121 hi def link xdefaultsSymbol Statement
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
122 hi def link xdefaultsSpecial Statement
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
123 hi def link xdefaultsErrorLine Error
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
124 hi def link xdefaultsCommentError Error
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
125 hi def link xdefaultsPunct Normal
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
126 hi def link xdefaultsLineEnd Special
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
127 hi def link xdefaultsTodo Todo
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130 let b:current_syntax = "xdefaults"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132 " vim:ts=8