178 lines · 6.7 KB · Text
RawDownload
" Vim syntax file" Language:	Vim help file" Maintainer:	Bram Moolenaar (Bram@vim.org)" Last Change:	2006 May 13 " Quit when a (custom) syntax file was already loadedif exists("b:current_syntax")  finishendif syn match helpHeadline		"^[-A-Z .]\+[ \t]\+\*"me=e-1syn match helpSectionDelim	"^=\{3,}.*===$"syn match helpSectionDelim	"^-\{3,}.*--$"syn region helpExample		matchgroup=helpIgnore start=" >$" start="^>$" end="^[^ \t]"me=e-1 end="^<"if has("ebcdic")  syn match helpHyperTextJump	"\\\@<!|[^"*|]\+|" contains=helpBar  syn match helpHyperTextEntry	"\*[^"*|]\+\*\s"he=e-1 contains=helpStar  syn match helpHyperTextEntry	"\*[^"*|]\+\*$" contains=helpStarelse  syn match helpHyperTextJump	"\\\@<!|[#-)!+-~]\+|" contains=helpBar  syn match helpHyperTextEntry	"\*[#-)!+-~]\+\*\s"he=e-1 contains=helpStar  syn match helpHyperTextEntry	"\*[#-)!+-~]\+\*$" contains=helpStarendifsyn match helpBar		contained "|"syn match helpStar		contained "\*"syn match helpNormal		"|.*====*|"syn match helpNormal		":|vim:|"	" for :help modelinesyn match helpVim		"Vim version [0-9.a-z]\+"syn match helpVim		"VIM REFERENCE.*"syn match helpOption		"'[a-z]\{2,\}'"syn match helpOption		"'t_..'"syn match helpHeader		"\s*\zs.\{-}\ze\s\=\~$" nextgroup=helpIgnoresyn match helpIgnore		"." containedsyn keyword helpNote		note Note NOTE note: Note: NOTE: Notes Notes:syn match helpSpecial		"\<N\>"syn match helpSpecial		"\<N\.$"me=e-1syn match helpSpecial		"\<N\.\s"me=e-2syn match helpSpecial		"(N\>"ms=s+1syn match helpSpecial		"\[N]"" avoid highlighting N  N in help.txtsyn match helpSpecial		"N  N"he=s+1syn match helpSpecial		"Nth"me=e-2syn match helpSpecial		"N-1"me=e-2syn match helpSpecial		"{[-a-zA-Z0-9'":%#=[\]<>.,]\+}"syn match helpSpecial		"{[-a-zA-Z0-9'"*+/:%#=[\]<>.,]\+}"syn match helpSpecial		"\s\[[-a-z^A-Z0-9_]\{2,}]"ms=s+1syn match helpSpecial		"<[-a-zA-Z0-9_]\+>"syn match helpSpecial		"<[SCM]-.>"syn match helpNormal		"<---*>"syn match helpSpecial		"\[range]"syn match helpSpecial		"\[line]"syn match helpSpecial		"\[count]"syn match helpSpecial		"\[offset]"syn match helpSpecial		"\[cmd]"syn match helpSpecial		"\[num]"syn match helpSpecial		"\[+num]"syn match helpSpecial		"\[-num]"syn match helpSpecial		"\[+cmd]"syn match helpSpecial		"\[++opt]"syn match helpSpecial		"\[arg]"syn match helpSpecial		"\[arguments]"syn match helpSpecial		"\[ident]"syn match helpSpecial		"\[addr]"syn match helpSpecial		"\[group]"syn match helpSpecial		"CTRL-."syn match helpSpecial		"CTRL-Break"syn match helpSpecial		"CTRL-PageUp"syn match helpSpecial		"CTRL-PageDown"syn match helpSpecial		"CTRL-Insert"syn match helpSpecial		"CTRL-Del"syn match helpSpecial		"CTRL-{char}"syn region helpNotVi		start="{Vi[: ]" start="{not" start="{only" end="}" contains=helpLeadBlank,helpHyperTextJumpsyn match helpLeadBlank		"^\s\+" contained " Highlight group items in their own color.syn match helpComment		"\t[* ]Comment\t\+[a-z].*"syn match helpConstant		"\t[* ]Constant\t\+[a-z].*"syn match helpString		"\t[* ]String\t\+[a-z].*"syn match helpCharacter		"\t[* ]Character\t\+[a-z].*"syn match helpNumber		"\t[* ]Number\t\+[a-z].*"syn match helpBoolean		"\t[* ]Boolean\t\+[a-z].*"syn match helpFloat		"\t[* ]Float\t\+[a-z].*"syn match helpIdentifier	"\t[* ]Identifier\t\+[a-z].*"syn match helpFunction		"\t[* ]Function\t\+[a-z].*"syn match helpStatement		"\t[* ]Statement\t\+[a-z].*"syn match helpConditional	"\t[* ]Conditional\t\+[a-z].*"syn match helpRepeat		"\t[* ]Repeat\t\+[a-z].*"syn match helpLabel		"\t[* ]Label\t\+[a-z].*"syn match helpOperator		"\t[* ]Operator\t\+["a-z].*"syn match helpKeyword		"\t[* ]Keyword\t\+[a-z].*"syn match helpException		"\t[* ]Exception\t\+[a-z].*"syn match helpPreProc		"\t[* ]PreProc\t\+[a-z].*"syn match helpInclude		"\t[* ]Include\t\+[a-z].*"syn match helpDefine		"\t[* ]Define\t\+[a-z].*"syn match helpMacro		"\t[* ]Macro\t\+[a-z].*"syn match helpPreCondit		"\t[* ]PreCondit\t\+[a-z].*"syn match helpType		"\t[* ]Type\t\+[a-z].*"syn match helpStorageClass	"\t[* ]StorageClass\t\+[a-z].*"syn match helpStructure		"\t[* ]Structure\t\+[a-z].*"syn match helpTypedef		"\t[* ]Typedef\t\+[Aa-z].*"syn match helpSpecial		"\t[* ]Special\t\+[a-z].*"syn match helpSpecialChar	"\t[* ]SpecialChar\t\+[a-z].*"syn match helpTag		"\t[* ]Tag\t\+[a-z].*"syn match helpDelimiter		"\t[* ]Delimiter\t\+[a-z].*"syn match helpSpecialComment	"\t[* ]SpecialComment\t\+[a-z].*"syn match helpDebug		"\t[* ]Debug\t\+[a-z].*"syn match helpUnderlined	"\t[* ]Underlined\t\+[a-z].*"syn match helpError		"\t[* ]Error\t\+[a-z].*"syn match helpTodo		"\t[* ]Todo\t\+[a-z].*" syn match helpURL `\v<(((https?|ftp|gopher)://|(mailto|file|news):)[^' 	<>"]+|(www|web|w3)[a-z0-9_-]*\.[a-z0-9._-]+\.[^' 	<>"]+)[a-zA-Z0-9/]` " Additionally load a language-specific syntax file "help_ab.vim".let s:i = match(expand("%"), '\.\a\ax$')if s:i > 0  exe "runtime syntax/help_" . strpart(expand("%"), s:i + 1, 2) . ".vim"endif syn sync minlines=40  " Define the default highlighting." Only used when an item doesn't have highlighting yethi def link helpExampleStart	helpIgnorehi def link helpIgnore		Ignorehi def link helpHyperTextJump	Subtitlehi def link helpBar		Ignorehi def link helpStar		Ignorehi def link helpHyperTextEntry	Stringhi def link helpHeadline	Statementhi def link helpHeader		PreProchi def link helpSectionDelim	PreProchi def link helpVim		Identifierhi def link helpExample		Commenthi def link helpOption		Typehi def link helpNotVi		Specialhi def link helpSpecial		Specialhi def link helpNote		Todohi def link Subtitle		Identifier hi def link helpComment		Commenthi def link helpConstant	Constanthi def link helpString		Stringhi def link helpCharacter	Characterhi def link helpNumber		Numberhi def link helpBoolean		Booleanhi def link helpFloat		Floathi def link helpIdentifier	Identifierhi def link helpFunction	Functionhi def link helpStatement	Statementhi def link helpConditional	Conditionalhi def link helpRepeat		Repeathi def link helpLabel		Labelhi def link helpOperator	Operatorhi def link helpKeyword		Keywordhi def link helpException	Exceptionhi def link helpPreProc		PreProchi def link helpInclude		Includehi def link helpDefine		Definehi def link helpMacro		Macrohi def link helpPreCondit	PreCondithi def link helpType		Typehi def link helpStorageClass	StorageClasshi def link helpStructure	Structurehi def link helpTypedef		Typedefhi def link helpSpecialChar	SpecialCharhi def link helpTag		Taghi def link helpDelimiter	Delimiterhi def link helpSpecialComment	SpecialCommenthi def link helpDebug		Debughi def link helpUnderlined	Underlinedhi def link helpError		Errorhi def link helpTodo		Todohi def link helpURL		String let b:current_syntax = "help" " vim: ts=8 sw=2