annotate runtime/syntax/xdefaults.vim @ 3137:b5a2b4c0c1ca v7.3.339

updated for version 7.3.339 Problem: "make shadow" doesn't link all test files. Solution: Add a line in Makefile and Filelist.
author Bram Moolenaar <bram@vim.org>
date Thu, 20 Oct 2011 16:35:35 +0200
parents 7bc41231fbc7
children 1b584a6f446c
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 " turn case on
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 if !exists("xdefaults_no_colon_errors")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 " mark lines which do not contain a colon as errors.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 " This does not really catch all errors but only lines
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 " which contain at least two WORDS and no colon. This
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 " was done this way so that a line is not marked as
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 " error while typing (which would be annoying).
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syntax match xdefaultsErrorLine "^\s*[a-zA-Z.*]\+\s\+[^: ]\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 " syn region xdefaultsLabel start=+^[^:]\{-}:+he=e-1 skip=+\\+ end="$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn match xdefaultsLabel +[^:]\{-}:+he=e-1 contains=xdefaultsPunct,xdefaultsSpecial,xdefaultsLineEnd
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn region xdefaultsValue keepend start=+:+lc=1 skip=+\\+ end=+$+ contains=xdefaultsSpecial,xdefaultsLabel,xdefaultsLineEnd
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn match xdefaultsSpecial contained +#override+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn match xdefaultsSpecial contained +#augment+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn match xdefaultsPunct contained +[.*:]+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn match xdefaultsLineEnd contained +\\$+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn match xdefaultsLineEnd contained +\\n\\$+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn match xdefaultsLineEnd contained +\\n$+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 " COMMENTS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 " 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
51 syn match xdefaultsComment "^!.*$" contains=xdefaultsTodo,@Spell
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 " lines starting with a '#' mark and which are not preprocessor
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 " lines are skipped. This is not part of the xrdb documentation.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 " It was reported by Bram Moolenaar and could be confirmed by
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 " having a look at xrdb.c:GetEntries()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 syn match xdefaultsCommentH "^#.*$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 "syn region xdefaultsComment start="^#" end="$" keepend contains=ALL
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 7
diff changeset
59 syn region xdefaultsComment start="/\*" end="\*/" contains=xdefaultsTodo,@Spell
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 syntax match xdefaultsCommentError "\*/"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 syn keyword xdefaultsTodo contained TODO FIXME XXX display
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 " PREPROCESSOR STUFF
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 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
70 if !exists("xdefaults_no_if0")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 syn region xdefaultsCppOut start="^\s*#\s*if\s\+0\>" end=".\|$" contains=xdefaultsCppOut2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 syn region xdefaultsCppOut2 contained start="0" end="^\s*#\s*\(endif\>\|else\>\|elif\>\)" contains=xdefaultsCppSkip
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 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
74 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 syn region xdefaultsIncluded contained start=+"+ skip=+\\\\\|\\"+ end=+"+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 syn match xdefaultsIncluded contained "<[^>]*>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 syn match xdefaultsInclude "^\s*#\s*include\>\s*["<]" contains=xdefaultsIncluded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 syn cluster xdefaultsPreProcGroup contains=xdefaultsPreProc,xdefaultsIncluded,xdefaultsInclude,xdefaultsDefine
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 syn region xdefaultsDefine start="^\s*#\s*\(define\|undef\)\>" skip="\\$" end="$" contains=ALLBUT,@xdefaultsPreProcGroup,xdefaultsCommentH,xdefaultsErrorLine
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 syn region xdefaultsPreProc start="^\s*#\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@xdefaultsPreProcGroup,xdefaultsCommentH,xdefaultsErrorLine
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 " symbols as defined by xrdb
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 syn keyword xdefaultsSymbol contained SERVERHOST
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 syn match xdefaultsSymbol contained "SRVR_[a-zA-Z0-9_]\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 syn keyword xdefaultsSymbol contained HOST
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 syn keyword xdefaultsSymbol contained DISPLAY_NUM
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 syn keyword xdefaultsSymbol contained CLIENTHOST
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 syn match xdefaultsSymbol contained "CLNT_[a-zA-Z0-9_]\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 syn keyword xdefaultsSymbol contained RELEASE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 syn keyword xdefaultsSymbol contained REVISION
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 syn keyword xdefaultsSymbol contained VERSION
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 syn keyword xdefaultsSymbol contained VENDOR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 syn match xdefaultsSymbol contained "VNDR_[a-zA-Z0-9_]\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 syn match xdefaultsSymbol contained "EXT_[a-zA-Z0-9_]\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 syn keyword xdefaultsSymbol contained NUM_SCREENS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 syn keyword xdefaultsSymbol contained SCREEN_NUM
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 syn keyword xdefaultsSymbol contained BITS_PER_RGB
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 syn keyword xdefaultsSymbol contained CLASS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 syn keyword xdefaultsSymbol contained StaticGray GrayScale StaticColor PseudoColor TrueColor DirectColor
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 syn match xdefaultsSymbol contained "CLASS_\(StaticGray\|GrayScale\|StaticColor\|PseudoColor\|TrueColor\|DirectColor\)"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 syn keyword xdefaultsSymbol contained COLOR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 syn match xdefaultsSymbol contained "CLASS_\(StaticGray\|GrayScale\|StaticColor\|PseudoColor\|TrueColor\|DirectColor\)_[0-9]\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 syn keyword xdefaultsSymbol contained HEIGHT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 syn keyword xdefaultsSymbol contained WIDTH
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 syn keyword xdefaultsSymbol contained PLANES
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 syn keyword xdefaultsSymbol contained X_RESOLUTION
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 syn keyword xdefaultsSymbol contained Y_RESOLUTION
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113 " 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
114 if version >= 508 || !exists("did_xdefaults_syntax_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116 let did_xdefaults_syntax_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121 HiLink xdefaultsLabel Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122 HiLink xdefaultsValue Constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123 HiLink xdefaultsComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124 HiLink xdefaultsCommentH xdefaultsComment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125 HiLink xdefaultsPreProc PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126 HiLink xdefaultsInclude xdefaultsPreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127 HiLink xdefaultsCppSkip xdefaultsCppOut
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128 HiLink xdefaultsCppOut2 xdefaultsCppOut
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129 HiLink xdefaultsCppOut Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130 HiLink xdefaultsIncluded String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131 HiLink xdefaultsDefine Macro
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132 HiLink xdefaultsSymbol Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
133 HiLink xdefaultsSpecial Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
134 HiLink xdefaultsErrorLine Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135 HiLink xdefaultsCommentError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136 HiLink xdefaultsPunct Normal
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
137 HiLink xdefaultsLineEnd Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
138 HiLink xdefaultsTodo Todo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
140 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
141 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
142
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
143 let b:current_syntax = "xdefaults"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
144
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
145 " vim:ts=8