annotate runtime/syntax/help.vim @ 344:7033303ea0c0 v7.0089

updated for version 7.0089
author vimboss
date Tue, 21 Jun 2005 22:37:39 +0000
parents 73354c21f1e4
children 52e76e2b5b65
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: Vim help file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Bram Moolenaar (Bram@vim.org)
344
7033303ea0c0 updated for version 7.0089
vimboss
parents: 237
diff changeset
4 " Last Change: 2005 Jun 20
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
344
7033303ea0c0 updated for version 7.0089
vimboss
parents: 237
diff changeset
6 " Quit when a (custom) syntax file was already loaded
7033303ea0c0 updated for version 7.0089
vimboss
parents: 237
diff changeset
7 if exists("b:current_syntax")
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 syn match helpHeadline "^[A-Z ]\+[ ]\+\*"me=e-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 syn match helpSectionDelim "^=\{3,}.*===$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 syn match helpSectionDelim "^-\{3,}.*--$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 syn region helpExample matchgroup=helpIgnore start=" >$" start="^>$" end="^[^ \t]"me=e-1 end="^<"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 if has("ebcdic")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 syn match helpHyperTextJump "\\\@<!|[^"*|]\+|"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 syn match helpHyperTextEntry "\*[^"*|]\+\*\s"he=e-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 syn match helpHyperTextEntry "\*[^"*|]\+\*$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 syn match helpHyperTextJump "\\\@<!|[#-)!+-~]\+|"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn match helpHyperTextEntry "\*[#-)!+-~]\+\*\s"he=e-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn match helpHyperTextEntry "\*[#-)!+-~]\+\*$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn match helpNormal "|.*====*|"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn match helpNormal ":|vim:|" " for :help modeline
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn match helpVim "Vim version [0-9.a-z]\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn match helpVim "VIM REFERENCE.*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn match helpOption "'[a-z]\{2,\}'"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn match helpOption "'t_..'"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn match helpHeader "\s*\zs.\{-}\ze\s\=\~$" nextgroup=helpIgnore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn match helpIgnore "." contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn keyword helpNote note Note NOTE note: Note: NOTE: Notes Notes:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn match helpSpecial "\<N\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn match helpSpecial "\<N\.$"me=e-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn match helpSpecial "\<N\.\s"me=e-2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn match helpSpecial "(N\>"ms=s+1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn match helpSpecial "\[N]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 " avoid highlighting N N in help.txt
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn match helpSpecial "N N"he=s+1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn match helpSpecial "Nth"me=e-2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn match helpSpecial "N-1"me=e-2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn match helpSpecial "{[-a-zA-Z0-9'":%#=[\]<>.,]\+}"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn match helpSpecial "{[-a-zA-Z0-9'"*+/:%#=[\]<>.,]\+}"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn match helpSpecial "\s\[[-a-z^A-Z0-9_]\{2,}]"ms=s+1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn match helpSpecial "<[-a-zA-Z0-9_]\+>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn match helpSpecial "<[SCM]-.>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn match helpNormal "<---*>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn match helpSpecial "\[range]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn match helpSpecial "\[line]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 syn match helpSpecial "\[count]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn match helpSpecial "\[offset]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn match helpSpecial "\[cmd]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 syn match helpSpecial "\[num]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 syn match helpSpecial "\[+num]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn match helpSpecial "\[-num]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 syn match helpSpecial "\[+cmd]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 syn match helpSpecial "\[++opt]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syn match helpSpecial "\[arg]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 syn match helpSpecial "\[arguments]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 syn match helpSpecial "\[ident]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 syn match helpSpecial "\[addr]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 syn match helpSpecial "\[group]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 syn match helpSpecial "CTRL-."
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 syn match helpSpecial "CTRL-Break"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 syn match helpSpecial "CTRL-PageUp"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 syn match helpSpecial "CTRL-PageDown"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 syn match helpSpecial "CTRL-Insert"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 syn match helpSpecial "CTRL-Del"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 syn match helpSpecial "CTRL-{char}"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 syn region helpNotVi start="{Vi[: ]" start="{not" start="{only" end="}" contains=helpLeadBlank,helpHyperTextJump
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 syn match helpLeadBlank "^\s\+" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 " Highlight group items in their own color.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 syn match helpComment "\t[* ]Comment\t\+[a-z].*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 syn match helpConstant "\t[* ]Constant\t\+[a-z].*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 syn match helpString "\t[* ]String\t\+[a-z].*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 syn match helpCharacter "\t[* ]Character\t\+[a-z].*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 syn match helpNumber "\t[* ]Number\t\+[a-z].*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 syn match helpBoolean "\t[* ]Boolean\t\+[a-z].*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 syn match helpFloat "\t[* ]Float\t\+[a-z].*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 syn match helpIdentifier "\t[* ]Identifier\t\+[a-z].*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 syn match helpFunction "\t[* ]Function\t\+[a-z].*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 syn match helpStatement "\t[* ]Statement\t\+[a-z].*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 syn match helpConditional "\t[* ]Conditional\t\+[a-z].*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 syn match helpRepeat "\t[* ]Repeat\t\+[a-z].*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 syn match helpLabel "\t[* ]Label\t\+[a-z].*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 syn match helpOperator "\t[* ]Operator\t\+["a-z].*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 syn match helpKeyword "\t[* ]Keyword\t\+[a-z].*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 syn match helpException "\t[* ]Exception\t\+[a-z].*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 syn match helpPreProc "\t[* ]PreProc\t\+[a-z].*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 syn match helpInclude "\t[* ]Include\t\+[a-z].*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 syn match helpDefine "\t[* ]Define\t\+[a-z].*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 syn match helpMacro "\t[* ]Macro\t\+[a-z].*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 syn match helpPreCondit "\t[* ]PreCondit\t\+[a-z].*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 syn match helpType "\t[* ]Type\t\+[a-z].*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 syn match helpStorageClass "\t[* ]StorageClass\t\+[a-z].*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 syn match helpStructure "\t[* ]Structure\t\+[a-z].*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 syn match helpTypedef "\t[* ]Typedef\t\+[Aa-z].*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 syn match helpSpecial "\t[* ]Special\t\+[a-z].*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 syn match helpSpecialChar "\t[* ]SpecialChar\t\+[a-z].*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 syn match helpTag "\t[* ]Tag\t\+[a-z].*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 syn match helpDelimiter "\t[* ]Delimiter\t\+[a-z].*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 syn match helpSpecialComment "\t[* ]SpecialComment\t\+[a-z].*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 syn match helpDebug "\t[* ]Debug\t\+[a-z].*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 syn match helpUnderlined "\t[* ]Underlined\t\+[a-z].*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 syn match helpError "\t[* ]Error\t\+[a-z].*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 syn match helpTodo "\t[* ]Todo\t\+[a-z].*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 " Additionally load a language-specific syntax file "help_ab.vim".
237
73354c21f1e4 updated for version 7.0066
vimboss
parents: 7
diff changeset
111 let s:i = match(expand("%"), '\.\a\ax$')
73354c21f1e4 updated for version 7.0066
vimboss
parents: 7
diff changeset
112 if s:i > 0
73354c21f1e4 updated for version 7.0066
vimboss
parents: 7
diff changeset
113 exe "runtime syntax/help_" . strpart(expand("%"), s:i + 1, 2) . ".vim"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116 syn sync minlines=40
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119 " Define the default highlighting.
344
7033303ea0c0 updated for version 7.0089
vimboss
parents: 237
diff changeset
120 " Only used when an item doesn't have highlighting yet
7033303ea0c0 updated for version 7.0089
vimboss
parents: 237
diff changeset
121 hi def link helpExampleStart helpIgnore
7033303ea0c0 updated for version 7.0089
vimboss
parents: 237
diff changeset
122 hi def link helpIgnore Ignore
7033303ea0c0 updated for version 7.0089
vimboss
parents: 237
diff changeset
123 hi def link helpHyperTextJump Subtitle
7033303ea0c0 updated for version 7.0089
vimboss
parents: 237
diff changeset
124 hi def link helpHyperTextEntry String
7033303ea0c0 updated for version 7.0089
vimboss
parents: 237
diff changeset
125 hi def link helpHeadline Statement
7033303ea0c0 updated for version 7.0089
vimboss
parents: 237
diff changeset
126 hi def link helpHeader PreProc
7033303ea0c0 updated for version 7.0089
vimboss
parents: 237
diff changeset
127 hi def link helpSectionDelim PreProc
7033303ea0c0 updated for version 7.0089
vimboss
parents: 237
diff changeset
128 hi def link helpVim Identifier
7033303ea0c0 updated for version 7.0089
vimboss
parents: 237
diff changeset
129 hi def link helpExample Comment
7033303ea0c0 updated for version 7.0089
vimboss
parents: 237
diff changeset
130 hi def link helpOption Type
7033303ea0c0 updated for version 7.0089
vimboss
parents: 237
diff changeset
131 hi def link helpNotVi Special
7033303ea0c0 updated for version 7.0089
vimboss
parents: 237
diff changeset
132 hi def link helpSpecial Special
7033303ea0c0 updated for version 7.0089
vimboss
parents: 237
diff changeset
133 hi def link helpNote Todo
7033303ea0c0 updated for version 7.0089
vimboss
parents: 237
diff changeset
134 hi def link Subtitle Identifier
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135
344
7033303ea0c0 updated for version 7.0089
vimboss
parents: 237
diff changeset
136 hi def link helpComment Comment
7033303ea0c0 updated for version 7.0089
vimboss
parents: 237
diff changeset
137 hi def link helpConstant Constant
7033303ea0c0 updated for version 7.0089
vimboss
parents: 237
diff changeset
138 hi def link helpString String
7033303ea0c0 updated for version 7.0089
vimboss
parents: 237
diff changeset
139 hi def link helpCharacter Character
7033303ea0c0 updated for version 7.0089
vimboss
parents: 237
diff changeset
140 hi def link helpNumber Number
7033303ea0c0 updated for version 7.0089
vimboss
parents: 237
diff changeset
141 hi def link helpBoolean Boolean
7033303ea0c0 updated for version 7.0089
vimboss
parents: 237
diff changeset
142 hi def link helpFloat Float
7033303ea0c0 updated for version 7.0089
vimboss
parents: 237
diff changeset
143 hi def link helpIdentifier Identifier
7033303ea0c0 updated for version 7.0089
vimboss
parents: 237
diff changeset
144 hi def link helpFunction Function
7033303ea0c0 updated for version 7.0089
vimboss
parents: 237
diff changeset
145 hi def link helpStatement Statement
7033303ea0c0 updated for version 7.0089
vimboss
parents: 237
diff changeset
146 hi def link helpConditional Conditional
7033303ea0c0 updated for version 7.0089
vimboss
parents: 237
diff changeset
147 hi def link helpRepeat Repeat
7033303ea0c0 updated for version 7.0089
vimboss
parents: 237
diff changeset
148 hi def link helpLabel Label
7033303ea0c0 updated for version 7.0089
vimboss
parents: 237
diff changeset
149 hi def link helpOperator Operator
7033303ea0c0 updated for version 7.0089
vimboss
parents: 237
diff changeset
150 hi def link helpKeyword Keyword
7033303ea0c0 updated for version 7.0089
vimboss
parents: 237
diff changeset
151 hi def link helpException Exception
7033303ea0c0 updated for version 7.0089
vimboss
parents: 237
diff changeset
152 hi def link helpPreProc PreProc
7033303ea0c0 updated for version 7.0089
vimboss
parents: 237
diff changeset
153 hi def link helpInclude Include
7033303ea0c0 updated for version 7.0089
vimboss
parents: 237
diff changeset
154 hi def link helpDefine Define
7033303ea0c0 updated for version 7.0089
vimboss
parents: 237
diff changeset
155 hi def link helpMacro Macro
7033303ea0c0 updated for version 7.0089
vimboss
parents: 237
diff changeset
156 hi def link helpPreCondit PreCondit
7033303ea0c0 updated for version 7.0089
vimboss
parents: 237
diff changeset
157 hi def link helpType Type
7033303ea0c0 updated for version 7.0089
vimboss
parents: 237
diff changeset
158 hi def link helpStorageClass StorageClass
7033303ea0c0 updated for version 7.0089
vimboss
parents: 237
diff changeset
159 hi def link helpStructure Structure
7033303ea0c0 updated for version 7.0089
vimboss
parents: 237
diff changeset
160 hi def link helpTypedef Typedef
7033303ea0c0 updated for version 7.0089
vimboss
parents: 237
diff changeset
161 hi def link helpSpecialChar SpecialChar
7033303ea0c0 updated for version 7.0089
vimboss
parents: 237
diff changeset
162 hi def link helpTag Tag
7033303ea0c0 updated for version 7.0089
vimboss
parents: 237
diff changeset
163 hi def link helpDelimiter Delimiter
7033303ea0c0 updated for version 7.0089
vimboss
parents: 237
diff changeset
164 hi def link helpSpecialComment SpecialComment
7033303ea0c0 updated for version 7.0089
vimboss
parents: 237
diff changeset
165 hi def link helpDebug Debug
7033303ea0c0 updated for version 7.0089
vimboss
parents: 237
diff changeset
166 hi def link helpUnderlined Underlined
7033303ea0c0 updated for version 7.0089
vimboss
parents: 237
diff changeset
167 hi def link helpError Error
7033303ea0c0 updated for version 7.0089
vimboss
parents: 237
diff changeset
168 hi def link helpTodo Todo
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
169
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
170 let b:current_syntax = "help"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
171
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
172 " vim: ts=8 sw=2