Mercurial > vim
annotate runtime/syntax/help.vim @ 3891:916b5c11a13e v7.3.702
updated for version 7.3.702
Problem: Nmake from VS6 service pack 6 is not recognized.
Solution: Detect the version number. (Jiri Sedlak)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Sun, 21 Oct 2012 02:41:08 +0200 |
parents | 9910cbff5f16 |
children | 058f26a834c4 |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: Vim help file | |
3 " Maintainer: Bram Moolenaar (Bram@vim.org) | |
3713 | 4 " Last Change: 2012 Jul 16 |
7 | 5 |
344 | 6 " Quit when a (custom) syntax file was already loaded |
7 if exists("b:current_syntax") | |
7 | 8 finish |
9 endif | |
10 | |
3256 | 11 let s:cpo_save = &cpo |
12 set cpo&vim | |
13 | |
2034 | 14 syn match helpHeadline "^[-A-Z .][-A-Z0-9 .()]*[ \t]\+\*"me=e-1 |
3713 | 15 syn match helpSectionDelim "^===.*===$" |
16 syn match helpSectionDelim "^---.*--$" | |
2345 | 17 syn region helpExample matchgroup=helpIgnore start=" >$" start="^>$" end="^[^ \t]"me=e-1 end="^<" |
7 | 18 if has("ebcdic") |
827 | 19 syn match helpHyperTextJump "\\\@<!|[^"*|]\+|" contains=helpBar |
828 | 20 syn match helpHyperTextEntry "\*[^"*|]\+\*\s"he=e-1 contains=helpStar |
21 syn match helpHyperTextEntry "\*[^"*|]\+\*$" contains=helpStar | |
7 | 22 else |
827 | 23 syn match helpHyperTextJump "\\\@<!|[#-)!+-~]\+|" contains=helpBar |
828 | 24 syn match helpHyperTextEntry "\*[#-)!+-~]\+\*\s"he=e-1 contains=helpStar |
25 syn match helpHyperTextEntry "\*[#-)!+-~]\+\*$" contains=helpStar | |
7 | 26 endif |
2965 | 27 if has("conceal") |
3526
dd6c2497c997
Fix more 'cpo' issues in runtime files.
Bram Moolenaar <bram@vim.org>
parents:
3492
diff
changeset
|
28 syn match helpBar contained "[|`]" conceal |
2965 | 29 syn match helpStar contained "\*" conceal |
30 else | |
3526
dd6c2497c997
Fix more 'cpo' issues in runtime files.
Bram Moolenaar <bram@vim.org>
parents:
3492
diff
changeset
|
31 syn match helpBar contained "[|`]" |
2965 | 32 syn match helpStar contained "\*" |
33 endif | |
7 | 34 syn match helpNormal "|.*====*|" |
3224 | 35 syn match helpNormal "|||" |
7 | 36 syn match helpNormal ":|vim:|" " for :help modeline |
37 syn match helpVim "Vim version [0-9.a-z]\+" | |
38 syn match helpVim "VIM REFERENCE.*" | |
39 syn match helpOption "'[a-z]\{2,\}'" | |
40 syn match helpOption "'t_..'" | |
3526
dd6c2497c997
Fix more 'cpo' issues in runtime files.
Bram Moolenaar <bram@vim.org>
parents:
3492
diff
changeset
|
41 syn match helpCommand "`[^` ]*`"hs=s+1,he=e-1 contains=helpBar |
7 | 42 syn match helpHeader "\s*\zs.\{-}\ze\s\=\~$" nextgroup=helpIgnore |
2642 | 43 syn match helpGraphic ".* \ze`$" nextgroup=helpIgnore |
2965 | 44 if has("conceal") |
45 syn match helpIgnore "." contained conceal | |
46 else | |
47 syn match helpIgnore "." contained | |
48 endif | |
7 | 49 syn keyword helpNote note Note NOTE note: Note: NOTE: Notes Notes: |
50 syn match helpSpecial "\<N\>" | |
51 syn match helpSpecial "\<N\.$"me=e-1 | |
52 syn match helpSpecial "\<N\.\s"me=e-2 | |
53 syn match helpSpecial "(N\>"ms=s+1 | |
54 syn match helpSpecial "\[N]" | |
55 " avoid highlighting N N in help.txt | |
56 syn match helpSpecial "N N"he=s+1 | |
57 syn match helpSpecial "Nth"me=e-2 | |
58 syn match helpSpecial "N-1"me=e-2 | |
59 syn match helpSpecial "{[-a-zA-Z0-9'":%#=[\]<>.,]\+}" | |
60 syn match helpSpecial "{[-a-zA-Z0-9'"*+/:%#=[\]<>.,]\+}" | |
61 syn match helpSpecial "\s\[[-a-z^A-Z0-9_]\{2,}]"ms=s+1 | |
62 syn match helpSpecial "<[-a-zA-Z0-9_]\+>" | |
63 syn match helpSpecial "<[SCM]-.>" | |
64 syn match helpNormal "<---*>" | |
65 syn match helpSpecial "\[range]" | |
66 syn match helpSpecial "\[line]" | |
67 syn match helpSpecial "\[count]" | |
68 syn match helpSpecial "\[offset]" | |
69 syn match helpSpecial "\[cmd]" | |
70 syn match helpSpecial "\[num]" | |
71 syn match helpSpecial "\[+num]" | |
72 syn match helpSpecial "\[-num]" | |
73 syn match helpSpecial "\[+cmd]" | |
74 syn match helpSpecial "\[++opt]" | |
75 syn match helpSpecial "\[arg]" | |
76 syn match helpSpecial "\[arguments]" | |
77 syn match helpSpecial "\[ident]" | |
78 syn match helpSpecial "\[addr]" | |
79 syn match helpSpecial "\[group]" | |
80 syn match helpSpecial "CTRL-." | |
81 syn match helpSpecial "CTRL-Break" | |
82 syn match helpSpecial "CTRL-PageUp" | |
83 syn match helpSpecial "CTRL-PageDown" | |
84 syn match helpSpecial "CTRL-Insert" | |
85 syn match helpSpecial "CTRL-Del" | |
86 syn match helpSpecial "CTRL-{char}" | |
87 syn region helpNotVi start="{Vi[: ]" start="{not" start="{only" end="}" contains=helpLeadBlank,helpHyperTextJump | |
88 syn match helpLeadBlank "^\s\+" contained | |
89 | |
90 " Highlight group items in their own color. | |
91 syn match helpComment "\t[* ]Comment\t\+[a-z].*" | |
92 syn match helpConstant "\t[* ]Constant\t\+[a-z].*" | |
93 syn match helpString "\t[* ]String\t\+[a-z].*" | |
94 syn match helpCharacter "\t[* ]Character\t\+[a-z].*" | |
95 syn match helpNumber "\t[* ]Number\t\+[a-z].*" | |
96 syn match helpBoolean "\t[* ]Boolean\t\+[a-z].*" | |
97 syn match helpFloat "\t[* ]Float\t\+[a-z].*" | |
98 syn match helpIdentifier "\t[* ]Identifier\t\+[a-z].*" | |
99 syn match helpFunction "\t[* ]Function\t\+[a-z].*" | |
100 syn match helpStatement "\t[* ]Statement\t\+[a-z].*" | |
101 syn match helpConditional "\t[* ]Conditional\t\+[a-z].*" | |
102 syn match helpRepeat "\t[* ]Repeat\t\+[a-z].*" | |
103 syn match helpLabel "\t[* ]Label\t\+[a-z].*" | |
104 syn match helpOperator "\t[* ]Operator\t\+["a-z].*" | |
105 syn match helpKeyword "\t[* ]Keyword\t\+[a-z].*" | |
106 syn match helpException "\t[* ]Exception\t\+[a-z].*" | |
107 syn match helpPreProc "\t[* ]PreProc\t\+[a-z].*" | |
108 syn match helpInclude "\t[* ]Include\t\+[a-z].*" | |
109 syn match helpDefine "\t[* ]Define\t\+[a-z].*" | |
110 syn match helpMacro "\t[* ]Macro\t\+[a-z].*" | |
111 syn match helpPreCondit "\t[* ]PreCondit\t\+[a-z].*" | |
112 syn match helpType "\t[* ]Type\t\+[a-z].*" | |
113 syn match helpStorageClass "\t[* ]StorageClass\t\+[a-z].*" | |
114 syn match helpStructure "\t[* ]Structure\t\+[a-z].*" | |
115 syn match helpTypedef "\t[* ]Typedef\t\+[Aa-z].*" | |
116 syn match helpSpecial "\t[* ]Special\t\+[a-z].*" | |
117 syn match helpSpecialChar "\t[* ]SpecialChar\t\+[a-z].*" | |
118 syn match helpTag "\t[* ]Tag\t\+[a-z].*" | |
119 syn match helpDelimiter "\t[* ]Delimiter\t\+[a-z].*" | |
120 syn match helpSpecialComment "\t[* ]SpecialComment\t\+[a-z].*" | |
121 syn match helpDebug "\t[* ]Debug\t\+[a-z].*" | |
122 syn match helpUnderlined "\t[* ]Underlined\t\+[a-z].*" | |
123 syn match helpError "\t[* ]Error\t\+[a-z].*" | |
124 syn match helpTodo "\t[* ]Todo\t\+[a-z].*" | |
125 | |
810 | 126 syn match helpURL `\v<(((https?|ftp|gopher)://|(mailto|file|news):)[^' <>"]+|(www|web|w3)[a-z0-9_-]*\.[a-z0-9._-]+\.[^' <>"]+)[a-zA-Z0-9/]` |
7 | 127 |
128 " Additionally load a language-specific syntax file "help_ab.vim". | |
237 | 129 let s:i = match(expand("%"), '\.\a\ax$') |
130 if s:i > 0 | |
131 exe "runtime syntax/help_" . strpart(expand("%"), s:i + 1, 2) . ".vim" | |
7 | 132 endif |
133 | |
2289
3331756e4232
Make synstack() work on the character just after the end of the line.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
134 " Italian |
2308 | 135 if v:lang =~ '\<IT\>' || v:lang =~ '_IT\>' || v:lang =~? "italian" |
136 syn keyword helpNote nota Nota NOTA nota: Nota: NOTA: notare Notare NOTARE notare: Notare: NOTARE: | |
2289
3331756e4232
Make synstack() work on the character just after the end of the line.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
137 syn match helpSpecial "Nma"me=e-2 |
3331756e4232
Make synstack() work on the character just after the end of the line.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
138 syn match helpSpecial "Nme"me=e-2 |
3331756e4232
Make synstack() work on the character just after the end of the line.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
139 syn match helpSpecial "Nmi"me=e-2 |
3331756e4232
Make synstack() work on the character just after the end of the line.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
140 syn match helpSpecial "Nmo"me=e-2 |
3331756e4232
Make synstack() work on the character just after the end of the line.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
141 syn match helpSpecial "\[interv.]" |
3331756e4232
Make synstack() work on the character just after the end of the line.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
142 syn region helpNotVi start="{non" start="{solo" start="{disponibile" end="}" contains=helpLeadBlank,helpHyperTextJump |
3331756e4232
Make synstack() work on the character just after the end of the line.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
143 endif |
3331756e4232
Make synstack() work on the character just after the end of the line.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
144 |
7 | 145 syn sync minlines=40 |
146 | |
147 | |
148 " Define the default highlighting. | |
344 | 149 " Only used when an item doesn't have highlighting yet |
150 hi def link helpIgnore Ignore | |
151 hi def link helpHyperTextJump Subtitle | |
827 | 152 hi def link helpBar Ignore |
828 | 153 hi def link helpStar Ignore |
344 | 154 hi def link helpHyperTextEntry String |
155 hi def link helpHeadline Statement | |
156 hi def link helpHeader PreProc | |
157 hi def link helpSectionDelim PreProc | |
158 hi def link helpVim Identifier | |
3492 | 159 hi def link helpCommand Comment |
344 | 160 hi def link helpExample Comment |
161 hi def link helpOption Type | |
162 hi def link helpNotVi Special | |
163 hi def link helpSpecial Special | |
164 hi def link helpNote Todo | |
165 hi def link Subtitle Identifier | |
7 | 166 |
344 | 167 hi def link helpComment Comment |
168 hi def link helpConstant Constant | |
169 hi def link helpString String | |
170 hi def link helpCharacter Character | |
171 hi def link helpNumber Number | |
172 hi def link helpBoolean Boolean | |
173 hi def link helpFloat Float | |
174 hi def link helpIdentifier Identifier | |
175 hi def link helpFunction Function | |
176 hi def link helpStatement Statement | |
177 hi def link helpConditional Conditional | |
178 hi def link helpRepeat Repeat | |
179 hi def link helpLabel Label | |
180 hi def link helpOperator Operator | |
181 hi def link helpKeyword Keyword | |
182 hi def link helpException Exception | |
183 hi def link helpPreProc PreProc | |
184 hi def link helpInclude Include | |
185 hi def link helpDefine Define | |
186 hi def link helpMacro Macro | |
187 hi def link helpPreCondit PreCondit | |
188 hi def link helpType Type | |
189 hi def link helpStorageClass StorageClass | |
190 hi def link helpStructure Structure | |
191 hi def link helpTypedef Typedef | |
192 hi def link helpSpecialChar SpecialChar | |
193 hi def link helpTag Tag | |
194 hi def link helpDelimiter Delimiter | |
195 hi def link helpSpecialComment SpecialComment | |
196 hi def link helpDebug Debug | |
197 hi def link helpUnderlined Underlined | |
198 hi def link helpError Error | |
199 hi def link helpTodo Todo | |
502 | 200 hi def link helpURL String |
7 | 201 |
202 let b:current_syntax = "help" | |
203 | |
3256 | 204 let &cpo = s:cpo_save |
205 unlet s:cpo_save | |
7 | 206 " vim: ts=8 sw=2 |