Mercurial > vim
annotate runtime/syntax/help.vim @ 8039:72324c2e890a v7.4.1314
commit https://github.com/vim/vim/commit/e516c39ee97cb85fa230fbb1b1f54ad1346920d9
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Feb 13 18:50:38 2016 +0100
patch 7.4.1314
Problem: Warning for uninitialzed variable.
Solution: Initialize it. (Dominique Pelle)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 13 Feb 2016 19:00:04 +0100 |
parents | 80e5f9584b02 |
children | b73f9ed65072 |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: Vim help file | |
3 " Maintainer: Bram Moolenaar (Bram@vim.org) | |
5692
80e5f9584b02
Update runtime files. Add Euphoria syntax files.
Bram Moolenaar <bram@vim.org>
parents:
5510
diff
changeset
|
4 " Last Change: 2014 Feb 12 |
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 "^---.*--$" | |
5161
f7add3891e95
Updated runtime files. Fix NL translations.
Bram Moolenaar <bram@vim.org>
parents:
4780
diff
changeset
|
17 if has("conceal") |
f7add3891e95
Updated runtime files. Fix NL translations.
Bram Moolenaar <bram@vim.org>
parents:
4780
diff
changeset
|
18 syn region helpExample matchgroup=helpIgnore start=" >$" start="^>$" end="^[^ \t]"me=e-1 end="^<" concealends |
f7add3891e95
Updated runtime files. Fix NL translations.
Bram Moolenaar <bram@vim.org>
parents:
4780
diff
changeset
|
19 else |
f7add3891e95
Updated runtime files. Fix NL translations.
Bram Moolenaar <bram@vim.org>
parents:
4780
diff
changeset
|
20 syn region helpExample matchgroup=helpIgnore start=" >$" start="^>$" end="^[^ \t]"me=e-1 end="^<" |
f7add3891e95
Updated runtime files. Fix NL translations.
Bram Moolenaar <bram@vim.org>
parents:
4780
diff
changeset
|
21 endif |
7 | 22 if has("ebcdic") |
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 else |
827 | 27 syn match helpHyperTextJump "\\\@<!|[#-)!+-~]\+|" contains=helpBar |
828 | 28 syn match helpHyperTextEntry "\*[#-)!+-~]\+\*\s"he=e-1 contains=helpStar |
29 syn match helpHyperTextEntry "\*[#-)!+-~]\+\*$" contains=helpStar | |
7 | 30 endif |
2965 | 31 if has("conceal") |
4098 | 32 syn match helpBar contained "|" conceal |
33 syn match helpBacktick contained "`" conceal | |
2965 | 34 syn match helpStar contained "\*" conceal |
35 else | |
4098 | 36 syn match helpBar contained "|" |
37 syn match helpBacktick contained "`" | |
2965 | 38 syn match helpStar contained "\*" |
39 endif | |
7 | 40 syn match helpNormal "|.*====*|" |
3224 | 41 syn match helpNormal "|||" |
7 | 42 syn match helpNormal ":|vim:|" " for :help modeline |
5692
80e5f9584b02
Update runtime files. Add Euphoria syntax files.
Bram Moolenaar <bram@vim.org>
parents:
5510
diff
changeset
|
43 syn match helpVim "\<Vim version [0-9][0-9.a-z]*" |
7 | 44 syn match helpVim "VIM REFERENCE.*" |
45 syn match helpOption "'[a-z]\{2,\}'" | |
46 syn match helpOption "'t_..'" | |
5340 | 47 syn match helpCommand "`[^` \t]\+`"hs=s+1,he=e-1 contains=helpBacktick |
7 | 48 syn match helpHeader "\s*\zs.\{-}\ze\s\=\~$" nextgroup=helpIgnore |
2642 | 49 syn match helpGraphic ".* \ze`$" nextgroup=helpIgnore |
2965 | 50 if has("conceal") |
51 syn match helpIgnore "." contained conceal | |
52 else | |
53 syn match helpIgnore "." contained | |
54 endif | |
7 | 55 syn keyword helpNote note Note NOTE note: Note: NOTE: Notes Notes: |
56 syn match helpSpecial "\<N\>" | |
57 syn match helpSpecial "\<N\.$"me=e-1 | |
58 syn match helpSpecial "\<N\.\s"me=e-2 | |
59 syn match helpSpecial "(N\>"ms=s+1 | |
60 syn match helpSpecial "\[N]" | |
61 " avoid highlighting N N in help.txt | |
62 syn match helpSpecial "N N"he=s+1 | |
63 syn match helpSpecial "Nth"me=e-2 | |
64 syn match helpSpecial "N-1"me=e-2 | |
65 syn match helpSpecial "{[-a-zA-Z0-9'"*+/:%#=[\]<>.,]\+}" | |
66 syn match helpSpecial "\s\[[-a-z^A-Z0-9_]\{2,}]"ms=s+1 | |
67 syn match helpSpecial "<[-a-zA-Z0-9_]\+>" | |
68 syn match helpSpecial "<[SCM]-.>" | |
69 syn match helpNormal "<---*>" | |
70 syn match helpSpecial "\[range]" | |
71 syn match helpSpecial "\[line]" | |
72 syn match helpSpecial "\[count]" | |
73 syn match helpSpecial "\[offset]" | |
74 syn match helpSpecial "\[cmd]" | |
75 syn match helpSpecial "\[num]" | |
76 syn match helpSpecial "\[+num]" | |
77 syn match helpSpecial "\[-num]" | |
78 syn match helpSpecial "\[+cmd]" | |
79 syn match helpSpecial "\[++opt]" | |
80 syn match helpSpecial "\[arg]" | |
81 syn match helpSpecial "\[arguments]" | |
82 syn match helpSpecial "\[ident]" | |
83 syn match helpSpecial "\[addr]" | |
84 syn match helpSpecial "\[group]" | |
85 syn match helpSpecial "CTRL-." | |
86 syn match helpSpecial "CTRL-Break" | |
87 syn match helpSpecial "CTRL-PageUp" | |
88 syn match helpSpecial "CTRL-PageDown" | |
89 syn match helpSpecial "CTRL-Insert" | |
90 syn match helpSpecial "CTRL-Del" | |
91 syn match helpSpecial "CTRL-{char}" | |
92 syn region helpNotVi start="{Vi[: ]" start="{not" start="{only" end="}" contains=helpLeadBlank,helpHyperTextJump | |
93 syn match helpLeadBlank "^\s\+" contained | |
94 | |
95 " Highlight group items in their own color. | |
96 syn match helpComment "\t[* ]Comment\t\+[a-z].*" | |
97 syn match helpConstant "\t[* ]Constant\t\+[a-z].*" | |
98 syn match helpString "\t[* ]String\t\+[a-z].*" | |
99 syn match helpCharacter "\t[* ]Character\t\+[a-z].*" | |
100 syn match helpNumber "\t[* ]Number\t\+[a-z].*" | |
101 syn match helpBoolean "\t[* ]Boolean\t\+[a-z].*" | |
102 syn match helpFloat "\t[* ]Float\t\+[a-z].*" | |
103 syn match helpIdentifier "\t[* ]Identifier\t\+[a-z].*" | |
104 syn match helpFunction "\t[* ]Function\t\+[a-z].*" | |
105 syn match helpStatement "\t[* ]Statement\t\+[a-z].*" | |
106 syn match helpConditional "\t[* ]Conditional\t\+[a-z].*" | |
107 syn match helpRepeat "\t[* ]Repeat\t\+[a-z].*" | |
108 syn match helpLabel "\t[* ]Label\t\+[a-z].*" | |
109 syn match helpOperator "\t[* ]Operator\t\+["a-z].*" | |
110 syn match helpKeyword "\t[* ]Keyword\t\+[a-z].*" | |
111 syn match helpException "\t[* ]Exception\t\+[a-z].*" | |
112 syn match helpPreProc "\t[* ]PreProc\t\+[a-z].*" | |
113 syn match helpInclude "\t[* ]Include\t\+[a-z].*" | |
114 syn match helpDefine "\t[* ]Define\t\+[a-z].*" | |
115 syn match helpMacro "\t[* ]Macro\t\+[a-z].*" | |
116 syn match helpPreCondit "\t[* ]PreCondit\t\+[a-z].*" | |
117 syn match helpType "\t[* ]Type\t\+[a-z].*" | |
118 syn match helpStorageClass "\t[* ]StorageClass\t\+[a-z].*" | |
119 syn match helpStructure "\t[* ]Structure\t\+[a-z].*" | |
120 syn match helpTypedef "\t[* ]Typedef\t\+[Aa-z].*" | |
121 syn match helpSpecial "\t[* ]Special\t\+[a-z].*" | |
122 syn match helpSpecialChar "\t[* ]SpecialChar\t\+[a-z].*" | |
123 syn match helpTag "\t[* ]Tag\t\+[a-z].*" | |
124 syn match helpDelimiter "\t[* ]Delimiter\t\+[a-z].*" | |
125 syn match helpSpecialComment "\t[* ]SpecialComment\t\+[a-z].*" | |
126 syn match helpDebug "\t[* ]Debug\t\+[a-z].*" | |
127 syn match helpUnderlined "\t[* ]Underlined\t\+[a-z].*" | |
128 syn match helpError "\t[* ]Error\t\+[a-z].*" | |
129 syn match helpTodo "\t[* ]Todo\t\+[a-z].*" | |
130 | |
810 | 131 syn match helpURL `\v<(((https?|ftp|gopher)://|(mailto|file|news):)[^' <>"]+|(www|web|w3)[a-z0-9_-]*\.[a-z0-9._-]+\.[^' <>"]+)[a-zA-Z0-9/]` |
7 | 132 |
133 " Additionally load a language-specific syntax file "help_ab.vim". | |
237 | 134 let s:i = match(expand("%"), '\.\a\ax$') |
135 if s:i > 0 | |
136 exe "runtime syntax/help_" . strpart(expand("%"), s:i + 1, 2) . ".vim" | |
7 | 137 endif |
138 | |
2289
3331756e4232
Make synstack() work on the character just after the end of the line.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
139 " Italian |
2308 | 140 if v:lang =~ '\<IT\>' || v:lang =~ '_IT\>' || v:lang =~? "italian" |
141 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
|
142 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
|
143 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
|
144 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
|
145 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
|
146 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
|
147 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
|
148 endif |
3331756e4232
Make synstack() work on the character just after the end of the line.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
149 |
7 | 150 syn sync minlines=40 |
151 | |
152 | |
153 " Define the default highlighting. | |
344 | 154 " Only used when an item doesn't have highlighting yet |
155 hi def link helpIgnore Ignore | |
5510 | 156 hi def link helpHyperTextJump Identifier |
827 | 157 hi def link helpBar Ignore |
4098 | 158 hi def link helpBacktick Ignore |
828 | 159 hi def link helpStar Ignore |
344 | 160 hi def link helpHyperTextEntry String |
161 hi def link helpHeadline Statement | |
162 hi def link helpHeader PreProc | |
163 hi def link helpSectionDelim PreProc | |
164 hi def link helpVim Identifier | |
3492 | 165 hi def link helpCommand Comment |
344 | 166 hi def link helpExample Comment |
167 hi def link helpOption Type | |
168 hi def link helpNotVi Special | |
169 hi def link helpSpecial Special | |
170 hi def link helpNote Todo | |
7 | 171 |
344 | 172 hi def link helpComment Comment |
173 hi def link helpConstant Constant | |
174 hi def link helpString String | |
175 hi def link helpCharacter Character | |
176 hi def link helpNumber Number | |
177 hi def link helpBoolean Boolean | |
178 hi def link helpFloat Float | |
179 hi def link helpIdentifier Identifier | |
180 hi def link helpFunction Function | |
181 hi def link helpStatement Statement | |
182 hi def link helpConditional Conditional | |
183 hi def link helpRepeat Repeat | |
184 hi def link helpLabel Label | |
185 hi def link helpOperator Operator | |
186 hi def link helpKeyword Keyword | |
187 hi def link helpException Exception | |
188 hi def link helpPreProc PreProc | |
189 hi def link helpInclude Include | |
190 hi def link helpDefine Define | |
191 hi def link helpMacro Macro | |
192 hi def link helpPreCondit PreCondit | |
193 hi def link helpType Type | |
194 hi def link helpStorageClass StorageClass | |
195 hi def link helpStructure Structure | |
196 hi def link helpTypedef Typedef | |
197 hi def link helpSpecialChar SpecialChar | |
198 hi def link helpTag Tag | |
199 hi def link helpDelimiter Delimiter | |
200 hi def link helpSpecialComment SpecialComment | |
201 hi def link helpDebug Debug | |
202 hi def link helpUnderlined Underlined | |
203 hi def link helpError Error | |
204 hi def link helpTodo Todo | |
502 | 205 hi def link helpURL String |
7 | 206 |
207 let b:current_syntax = "help" | |
208 | |
3256 | 209 let &cpo = s:cpo_save |
210 unlet s:cpo_save | |
7 | 211 " vim: ts=8 sw=2 |