xref: /vim-8.2.3635/runtime/syntax/help.vim (revision fa13eef3)
1071d4279SBram Moolenaar" Vim syntax file
2071d4279SBram Moolenaar" Language:	Vim help file
3071d4279SBram Moolenaar" Maintainer:	Bram Moolenaar ([email protected])
46c35beaaSBram Moolenaar" Last Change:	2012 Jul 16
5071d4279SBram Moolenaar
6d857f0e0SBram Moolenaar" Quit when a (custom) syntax file was already loaded
7d857f0e0SBram Moolenaarif exists("b:current_syntax")
8071d4279SBram Moolenaar  finish
9071d4279SBram Moolenaarendif
10071d4279SBram Moolenaar
116ee8d89cSBram Moolenaarlet s:cpo_save = &cpo
126ee8d89cSBram Moolenaarset cpo&vim
136ee8d89cSBram Moolenaar
145c73622aSBram Moolenaarsyn match helpHeadline		"^[-A-Z .][-A-Z0-9 .()]*[ \t]\+\*"me=e-1
156c35beaaSBram Moolenaarsyn match helpSectionDelim	"^===.*===$"
166c35beaaSBram Moolenaarsyn match helpSectionDelim	"^---.*--$"
17d28478b5SBram Moolenaarsyn region helpExample		matchgroup=helpIgnore start=" >$" start="^>$" end="^[^ \t]"me=e-1 end="^<"
18071d4279SBram Moolenaarif has("ebcdic")
1918144c84SBram Moolenaar  syn match helpHyperTextJump	"\\\@<!|[^"*|]\+|" contains=helpBar
207fc904b6SBram Moolenaar  syn match helpHyperTextEntry	"\*[^"*|]\+\*\s"he=e-1 contains=helpStar
217fc904b6SBram Moolenaar  syn match helpHyperTextEntry	"\*[^"*|]\+\*$" contains=helpStar
22071d4279SBram Moolenaarelse
2318144c84SBram Moolenaar  syn match helpHyperTextJump	"\\\@<!|[#-)!+-~]\+|" contains=helpBar
247fc904b6SBram Moolenaar  syn match helpHyperTextEntry	"\*[#-)!+-~]\+\*\s"he=e-1 contains=helpStar
257fc904b6SBram Moolenaar  syn match helpHyperTextEntry	"\*[#-)!+-~]\+\*$" contains=helpStar
26071d4279SBram Moolenaarendif
279729301aSBram Moolenaarif has("conceal")
28*fa13eef3SBram Moolenaar  syn match helpBar		contained "|" conceal
29*fa13eef3SBram Moolenaar  syn match helpBacktick	contained "`" conceal
30349b2fb0SBram Moolenaar  syn match helpStar		contained "\*" conceal
319729301aSBram Moolenaarelse
32*fa13eef3SBram Moolenaar  syn match helpBar		contained "|"
33*fa13eef3SBram Moolenaar  syn match helpBacktick	contained "`"
349729301aSBram Moolenaar  syn match helpStar		contained "\*"
359729301aSBram Moolenaarendif
36071d4279SBram Moolenaarsyn match helpNormal		"|.*====*|"
37f1568ecaSBram Moolenaarsyn match helpNormal		"|||"
38071d4279SBram Moolenaarsyn match helpNormal		":|vim:|"	" for :help modeline
39071d4279SBram Moolenaarsyn match helpVim		"Vim version [0-9.a-z]\+"
40071d4279SBram Moolenaarsyn match helpVim		"VIM REFERENCE.*"
41071d4279SBram Moolenaarsyn match helpOption		"'[a-z]\{2,\}'"
42071d4279SBram Moolenaarsyn match helpOption		"'t_..'"
43*fa13eef3SBram Moolenaarsyn match helpCommand		"`[^` ]*`"hs=s+1,he=e-1 contains=helpBacktick
44071d4279SBram Moolenaarsyn match helpHeader		"\s*\zs.\{-}\ze\s\=\~$" nextgroup=helpIgnore
45166af9bbSBram Moolenaarsyn match helpGraphic		".* \ze`$" nextgroup=helpIgnore
469729301aSBram Moolenaarif has("conceal")
47349b2fb0SBram Moolenaar  syn match helpIgnore		"." contained conceal
489729301aSBram Moolenaarelse
499729301aSBram Moolenaar  syn match helpIgnore		"." contained
509729301aSBram Moolenaarendif
51071d4279SBram Moolenaarsyn keyword helpNote		note Note NOTE note: Note: NOTE: Notes Notes:
52071d4279SBram Moolenaarsyn match helpSpecial		"\<N\>"
53071d4279SBram Moolenaarsyn match helpSpecial		"\<N\.$"me=e-1
54071d4279SBram Moolenaarsyn match helpSpecial		"\<N\.\s"me=e-2
55071d4279SBram Moolenaarsyn match helpSpecial		"(N\>"ms=s+1
56071d4279SBram Moolenaarsyn match helpSpecial		"\[N]"
57071d4279SBram Moolenaar" avoid highlighting N  N in help.txt
58071d4279SBram Moolenaarsyn match helpSpecial		"N  N"he=s+1
59071d4279SBram Moolenaarsyn match helpSpecial		"Nth"me=e-2
60071d4279SBram Moolenaarsyn match helpSpecial		"N-1"me=e-2
61071d4279SBram Moolenaarsyn match helpSpecial		"{[-a-zA-Z0-9'":%#=[\]<>.,]\+}"
62071d4279SBram Moolenaarsyn match helpSpecial		"{[-a-zA-Z0-9'"*+/:%#=[\]<>.,]\+}"
63071d4279SBram Moolenaarsyn match helpSpecial		"\s\[[-a-z^A-Z0-9_]\{2,}]"ms=s+1
64071d4279SBram Moolenaarsyn match helpSpecial		"<[-a-zA-Z0-9_]\+>"
65071d4279SBram Moolenaarsyn match helpSpecial		"<[SCM]-.>"
66071d4279SBram Moolenaarsyn match helpNormal		"<---*>"
67071d4279SBram Moolenaarsyn match helpSpecial		"\[range]"
68071d4279SBram Moolenaarsyn match helpSpecial		"\[line]"
69071d4279SBram Moolenaarsyn match helpSpecial		"\[count]"
70071d4279SBram Moolenaarsyn match helpSpecial		"\[offset]"
71071d4279SBram Moolenaarsyn match helpSpecial		"\[cmd]"
72071d4279SBram Moolenaarsyn match helpSpecial		"\[num]"
73071d4279SBram Moolenaarsyn match helpSpecial		"\[+num]"
74071d4279SBram Moolenaarsyn match helpSpecial		"\[-num]"
75071d4279SBram Moolenaarsyn match helpSpecial		"\[+cmd]"
76071d4279SBram Moolenaarsyn match helpSpecial		"\[++opt]"
77071d4279SBram Moolenaarsyn match helpSpecial		"\[arg]"
78071d4279SBram Moolenaarsyn match helpSpecial		"\[arguments]"
79071d4279SBram Moolenaarsyn match helpSpecial		"\[ident]"
80071d4279SBram Moolenaarsyn match helpSpecial		"\[addr]"
81071d4279SBram Moolenaarsyn match helpSpecial		"\[group]"
82071d4279SBram Moolenaarsyn match helpSpecial		"CTRL-."
83071d4279SBram Moolenaarsyn match helpSpecial		"CTRL-Break"
84071d4279SBram Moolenaarsyn match helpSpecial		"CTRL-PageUp"
85071d4279SBram Moolenaarsyn match helpSpecial		"CTRL-PageDown"
86071d4279SBram Moolenaarsyn match helpSpecial		"CTRL-Insert"
87071d4279SBram Moolenaarsyn match helpSpecial		"CTRL-Del"
88071d4279SBram Moolenaarsyn match helpSpecial		"CTRL-{char}"
89071d4279SBram Moolenaarsyn region helpNotVi		start="{Vi[: ]" start="{not" start="{only" end="}" contains=helpLeadBlank,helpHyperTextJump
90071d4279SBram Moolenaarsyn match helpLeadBlank		"^\s\+" contained
91071d4279SBram Moolenaar
92071d4279SBram Moolenaar" Highlight group items in their own color.
93071d4279SBram Moolenaarsyn match helpComment		"\t[* ]Comment\t\+[a-z].*"
94071d4279SBram Moolenaarsyn match helpConstant		"\t[* ]Constant\t\+[a-z].*"
95071d4279SBram Moolenaarsyn match helpString		"\t[* ]String\t\+[a-z].*"
96071d4279SBram Moolenaarsyn match helpCharacter		"\t[* ]Character\t\+[a-z].*"
97071d4279SBram Moolenaarsyn match helpNumber		"\t[* ]Number\t\+[a-z].*"
98071d4279SBram Moolenaarsyn match helpBoolean		"\t[* ]Boolean\t\+[a-z].*"
99071d4279SBram Moolenaarsyn match helpFloat		"\t[* ]Float\t\+[a-z].*"
100071d4279SBram Moolenaarsyn match helpIdentifier	"\t[* ]Identifier\t\+[a-z].*"
101071d4279SBram Moolenaarsyn match helpFunction		"\t[* ]Function\t\+[a-z].*"
102071d4279SBram Moolenaarsyn match helpStatement		"\t[* ]Statement\t\+[a-z].*"
103071d4279SBram Moolenaarsyn match helpConditional	"\t[* ]Conditional\t\+[a-z].*"
104071d4279SBram Moolenaarsyn match helpRepeat		"\t[* ]Repeat\t\+[a-z].*"
105071d4279SBram Moolenaarsyn match helpLabel		"\t[* ]Label\t\+[a-z].*"
106071d4279SBram Moolenaarsyn match helpOperator		"\t[* ]Operator\t\+["a-z].*"
107071d4279SBram Moolenaarsyn match helpKeyword		"\t[* ]Keyword\t\+[a-z].*"
108071d4279SBram Moolenaarsyn match helpException		"\t[* ]Exception\t\+[a-z].*"
109071d4279SBram Moolenaarsyn match helpPreProc		"\t[* ]PreProc\t\+[a-z].*"
110071d4279SBram Moolenaarsyn match helpInclude		"\t[* ]Include\t\+[a-z].*"
111071d4279SBram Moolenaarsyn match helpDefine		"\t[* ]Define\t\+[a-z].*"
112071d4279SBram Moolenaarsyn match helpMacro		"\t[* ]Macro\t\+[a-z].*"
113071d4279SBram Moolenaarsyn match helpPreCondit		"\t[* ]PreCondit\t\+[a-z].*"
114071d4279SBram Moolenaarsyn match helpType		"\t[* ]Type\t\+[a-z].*"
115071d4279SBram Moolenaarsyn match helpStorageClass	"\t[* ]StorageClass\t\+[a-z].*"
116071d4279SBram Moolenaarsyn match helpStructure		"\t[* ]Structure\t\+[a-z].*"
117071d4279SBram Moolenaarsyn match helpTypedef		"\t[* ]Typedef\t\+[Aa-z].*"
118071d4279SBram Moolenaarsyn match helpSpecial		"\t[* ]Special\t\+[a-z].*"
119071d4279SBram Moolenaarsyn match helpSpecialChar	"\t[* ]SpecialChar\t\+[a-z].*"
120071d4279SBram Moolenaarsyn match helpTag		"\t[* ]Tag\t\+[a-z].*"
121071d4279SBram Moolenaarsyn match helpDelimiter		"\t[* ]Delimiter\t\+[a-z].*"
122071d4279SBram Moolenaarsyn match helpSpecialComment	"\t[* ]SpecialComment\t\+[a-z].*"
123071d4279SBram Moolenaarsyn match helpDebug		"\t[* ]Debug\t\+[a-z].*"
124071d4279SBram Moolenaarsyn match helpUnderlined	"\t[* ]Underlined\t\+[a-z].*"
125071d4279SBram Moolenaarsyn match helpError		"\t[* ]Error\t\+[a-z].*"
126071d4279SBram Moolenaarsyn match helpTodo		"\t[* ]Todo\t\+[a-z].*"
127071d4279SBram Moolenaar
1283991dab8SBram Moolenaarsyn match helpURL `\v<(((https?|ftp|gopher)://|(mailto|file|news):)[^' 	<>"]+|(www|web|w3)[a-z0-9_-]*\.[a-z0-9._-]+\.[^' 	<>"]+)[a-zA-Z0-9/]`
129071d4279SBram Moolenaar
130071d4279SBram Moolenaar" Additionally load a language-specific syntax file "help_ab.vim".
13113fcaaf1SBram Moolenaarlet s:i = match(expand("%"), '\.\a\ax$')
13213fcaaf1SBram Moolenaarif s:i > 0
13313fcaaf1SBram Moolenaar  exe "runtime syntax/help_" . strpart(expand("%"), s:i + 1, 2) . ".vim"
134071d4279SBram Moolenaarendif
135071d4279SBram Moolenaar
136d04b7507SBram Moolenaar" Italian
1377abcaab7SBram Moolenaarif v:lang =~ '\<IT\>' || v:lang =~ '_IT\>' || v:lang =~? "italian"
1387abcaab7SBram Moolenaar  syn keyword helpNote		nota Nota NOTA nota: Nota: NOTA: notare Notare NOTARE notare: Notare: NOTARE:
139d04b7507SBram Moolenaar  syn match helpSpecial		"Nma"me=e-2
140d04b7507SBram Moolenaar  syn match helpSpecial		"Nme"me=e-2
141d04b7507SBram Moolenaar  syn match helpSpecial		"Nmi"me=e-2
142d04b7507SBram Moolenaar  syn match helpSpecial		"Nmo"me=e-2
143d04b7507SBram Moolenaar  syn match helpSpecial		"\[interv.]"
144d04b7507SBram Moolenaar  syn region helpNotVi		start="{non" start="{solo" start="{disponibile" end="}" contains=helpLeadBlank,helpHyperTextJump
145d04b7507SBram Moolenaarendif
146d04b7507SBram Moolenaar
147071d4279SBram Moolenaarsyn sync minlines=40
148071d4279SBram Moolenaar
149071d4279SBram Moolenaar
150071d4279SBram Moolenaar" Define the default highlighting.
151d857f0e0SBram Moolenaar" Only used when an item doesn't have highlighting yet
152d857f0e0SBram Moolenaarhi def link helpIgnore		Ignore
153d857f0e0SBram Moolenaarhi def link helpHyperTextJump	Subtitle
15418144c84SBram Moolenaarhi def link helpBar		Ignore
155*fa13eef3SBram Moolenaarhi def link helpBacktick	Ignore
1567fc904b6SBram Moolenaarhi def link helpStar		Ignore
157d857f0e0SBram Moolenaarhi def link helpHyperTextEntry	String
158d857f0e0SBram Moolenaarhi def link helpHeadline	Statement
159d857f0e0SBram Moolenaarhi def link helpHeader		PreProc
160d857f0e0SBram Moolenaarhi def link helpSectionDelim	PreProc
161d857f0e0SBram Moolenaarhi def link helpVim		Identifier
162d38b055aSBram Moolenaarhi def link helpCommand		Comment
163d857f0e0SBram Moolenaarhi def link helpExample		Comment
164d857f0e0SBram Moolenaarhi def link helpOption		Type
165d857f0e0SBram Moolenaarhi def link helpNotVi		Special
166d857f0e0SBram Moolenaarhi def link helpSpecial		Special
167d857f0e0SBram Moolenaarhi def link helpNote		Todo
168d857f0e0SBram Moolenaarhi def link Subtitle		Identifier
169071d4279SBram Moolenaar
170d857f0e0SBram Moolenaarhi def link helpComment		Comment
171d857f0e0SBram Moolenaarhi def link helpConstant	Constant
172d857f0e0SBram Moolenaarhi def link helpString		String
173d857f0e0SBram Moolenaarhi def link helpCharacter	Character
174d857f0e0SBram Moolenaarhi def link helpNumber		Number
175d857f0e0SBram Moolenaarhi def link helpBoolean		Boolean
176d857f0e0SBram Moolenaarhi def link helpFloat		Float
177d857f0e0SBram Moolenaarhi def link helpIdentifier	Identifier
178d857f0e0SBram Moolenaarhi def link helpFunction	Function
179d857f0e0SBram Moolenaarhi def link helpStatement	Statement
180d857f0e0SBram Moolenaarhi def link helpConditional	Conditional
181d857f0e0SBram Moolenaarhi def link helpRepeat		Repeat
182d857f0e0SBram Moolenaarhi def link helpLabel		Label
183d857f0e0SBram Moolenaarhi def link helpOperator	Operator
184d857f0e0SBram Moolenaarhi def link helpKeyword		Keyword
185d857f0e0SBram Moolenaarhi def link helpException	Exception
186d857f0e0SBram Moolenaarhi def link helpPreProc		PreProc
187d857f0e0SBram Moolenaarhi def link helpInclude		Include
188d857f0e0SBram Moolenaarhi def link helpDefine		Define
189d857f0e0SBram Moolenaarhi def link helpMacro		Macro
190d857f0e0SBram Moolenaarhi def link helpPreCondit	PreCondit
191d857f0e0SBram Moolenaarhi def link helpType		Type
192d857f0e0SBram Moolenaarhi def link helpStorageClass	StorageClass
193d857f0e0SBram Moolenaarhi def link helpStructure	Structure
194d857f0e0SBram Moolenaarhi def link helpTypedef		Typedef
195d857f0e0SBram Moolenaarhi def link helpSpecialChar	SpecialChar
196d857f0e0SBram Moolenaarhi def link helpTag		Tag
197d857f0e0SBram Moolenaarhi def link helpDelimiter	Delimiter
198d857f0e0SBram Moolenaarhi def link helpSpecialComment	SpecialComment
199d857f0e0SBram Moolenaarhi def link helpDebug		Debug
200d857f0e0SBram Moolenaarhi def link helpUnderlined	Underlined
201d857f0e0SBram Moolenaarhi def link helpError		Error
202d857f0e0SBram Moolenaarhi def link helpTodo		Todo
203e344beadSBram Moolenaarhi def link helpURL		String
204071d4279SBram Moolenaar
205071d4279SBram Moolenaarlet b:current_syntax = "help"
206071d4279SBram Moolenaar
2076ee8d89cSBram Moolenaarlet &cpo = s:cpo_save
2086ee8d89cSBram Moolenaarunlet s:cpo_save
209071d4279SBram Moolenaar" vim: ts=8 sw=2
210