1071d4279SBram Moolenaar" Vim syntax file 2071d4279SBram Moolenaar" Language: Vim help file 3071d4279SBram Moolenaar" Maintainer: Bram Moolenaar ([email protected]) 4*4d8f4761SBram Moolenaar" Last Change: 2021 Jun 13 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 14b17893aaSBram Moolenaarsyn match helpHeadline "^[-A-Z .][-A-Z0-9 .()_]*\ze\(\s\+\*\|$\)" 156c35beaaSBram Moolenaarsyn match helpSectionDelim "^===.*===$" 166c35beaaSBram Moolenaarsyn match helpSectionDelim "^---.*--$" 17dd007ed5SBram Moolenaarif has("conceal") 18dd007ed5SBram Moolenaar syn region helpExample matchgroup=helpIgnore start=" >$" start="^>$" end="^[^ \t]"me=e-1 end="^<" concealends 19dd007ed5SBram Moolenaarelse 20d28478b5SBram Moolenaar syn region helpExample matchgroup=helpIgnore start=" >$" start="^>$" end="^[^ \t]"me=e-1 end="^<" 21dd007ed5SBram Moolenaarendif 22071d4279SBram Moolenaarif has("ebcdic") 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 Moolenaarelse 2718144c84SBram Moolenaar syn match helpHyperTextJump "\\\@<!|[#-)!+-~]\+|" contains=helpBar 287fc904b6SBram Moolenaar syn match helpHyperTextEntry "\*[#-)!+-~]\+\*\s"he=e-1 contains=helpStar 297fc904b6SBram Moolenaar syn match helpHyperTextEntry "\*[#-)!+-~]\+\*$" contains=helpStar 30071d4279SBram Moolenaarendif 319729301aSBram Moolenaarif has("conceal") 32fa13eef3SBram Moolenaar syn match helpBar contained "|" conceal 33fa13eef3SBram Moolenaar syn match helpBacktick contained "`" conceal 34349b2fb0SBram Moolenaar syn match helpStar contained "\*" conceal 359729301aSBram Moolenaarelse 36fa13eef3SBram Moolenaar syn match helpBar contained "|" 37fa13eef3SBram Moolenaar syn match helpBacktick contained "`" 389729301aSBram Moolenaar syn match helpStar contained "\*" 399729301aSBram Moolenaarendif 40071d4279SBram Moolenaarsyn match helpNormal "|.*====*|" 41f1568ecaSBram Moolenaarsyn match helpNormal "|||" 42071d4279SBram Moolenaarsyn match helpNormal ":|vim:|" " for :help modeline 43251835e1SBram Moolenaarsyn match helpVim "\<Vim version [0-9][0-9.a-z]*" 44071d4279SBram Moolenaarsyn match helpVim "VIM REFERENCE.*" 45071d4279SBram Moolenaarsyn match helpOption "'[a-z]\{2,\}'" 46071d4279SBram Moolenaarsyn match helpOption "'t_..'" 477cba6c06SBram Moolenaarsyn match helpCommand "`[^` \t]\+`"hs=s+1,he=e-1 contains=helpBacktick 48939a1abeSBram Moolenaarsyn match helpCommand "\(^\|[^a-z"[]\)\zs`[^`]\+`\ze\([^a-z\t."']\|$\)"hs=s+1,he=e-1 contains=helpBacktick 49071d4279SBram Moolenaarsyn match helpHeader "\s*\zs.\{-}\ze\s\=\~$" nextgroup=helpIgnore 50166af9bbSBram Moolenaarsyn match helpGraphic ".* \ze`$" nextgroup=helpIgnore 519729301aSBram Moolenaarif has("conceal") 52349b2fb0SBram Moolenaar syn match helpIgnore "." contained conceal 539729301aSBram Moolenaarelse 549729301aSBram Moolenaar syn match helpIgnore "." contained 559729301aSBram Moolenaarendif 56071d4279SBram Moolenaarsyn keyword helpNote note Note NOTE note: Note: NOTE: Notes Notes: 573ec574f2SBram Moolenaarsyn keyword helpWarning WARNING WARNING: Warning: 583ec574f2SBram Moolenaarsyn keyword helpDeprecated DEPRECATED DEPRECATED: Deprecated: 59071d4279SBram Moolenaarsyn match helpSpecial "\<N\>" 60071d4279SBram Moolenaarsyn match helpSpecial "\<N\.$"me=e-1 61071d4279SBram Moolenaarsyn match helpSpecial "\<N\.\s"me=e-2 62071d4279SBram Moolenaarsyn match helpSpecial "(N\>"ms=s+1 6301164a65SBram Moolenaar 64071d4279SBram Moolenaarsyn match helpSpecial "\[N]" 65071d4279SBram Moolenaar" avoid highlighting N N in help.txt 66071d4279SBram Moolenaarsyn match helpSpecial "N N"he=s+1 67071d4279SBram Moolenaarsyn match helpSpecial "Nth"me=e-2 68071d4279SBram Moolenaarsyn match helpSpecial "N-1"me=e-2 69071d4279SBram Moolenaarsyn match helpSpecial "{[-a-zA-Z0-9'"*+/:%#=[\]<>.,]\+}" 70071d4279SBram Moolenaarsyn match helpSpecial "\s\[[-a-z^A-Z0-9_]\{2,}]"ms=s+1 71071d4279SBram Moolenaarsyn match helpSpecial "<[-a-zA-Z0-9_]\+>" 72071d4279SBram Moolenaarsyn match helpSpecial "<[SCM]-.>" 73071d4279SBram Moolenaarsyn match helpNormal "<---*>" 74071d4279SBram Moolenaarsyn match helpSpecial "\[range]" 75071d4279SBram Moolenaarsyn match helpSpecial "\[line]" 76071d4279SBram Moolenaarsyn match helpSpecial "\[count]" 77071d4279SBram Moolenaarsyn match helpSpecial "\[offset]" 78071d4279SBram Moolenaarsyn match helpSpecial "\[cmd]" 79*4d8f4761SBram Moolenaarsyn match helpNormal "vim9\[cmd]" 80071d4279SBram Moolenaarsyn match helpSpecial "\[num]" 81071d4279SBram Moolenaarsyn match helpSpecial "\[+num]" 82071d4279SBram Moolenaarsyn match helpSpecial "\[-num]" 83071d4279SBram Moolenaarsyn match helpSpecial "\[+cmd]" 84071d4279SBram Moolenaarsyn match helpSpecial "\[++opt]" 85071d4279SBram Moolenaarsyn match helpSpecial "\[arg]" 86071d4279SBram Moolenaarsyn match helpSpecial "\[arguments]" 87071d4279SBram Moolenaarsyn match helpSpecial "\[ident]" 88071d4279SBram Moolenaarsyn match helpSpecial "\[addr]" 89071d4279SBram Moolenaarsyn match helpSpecial "\[group]" 9001164a65SBram Moolenaar" Don't highlight [converted] and others that do not have a tag 9101164a65SBram Moolenaarsyn match helpNormal "\[\(readonly\|fifo\|socket\|converted\|crypted\)]" 9201164a65SBram Moolenaar 93071d4279SBram Moolenaarsyn match helpSpecial "CTRL-." 940c0734d5SBram Moolenaarsyn match helpSpecial "CTRL-SHIFT-." 95071d4279SBram Moolenaarsyn match helpSpecial "CTRL-Break" 96071d4279SBram Moolenaarsyn match helpSpecial "CTRL-PageUp" 97071d4279SBram Moolenaarsyn match helpSpecial "CTRL-PageDown" 98071d4279SBram Moolenaarsyn match helpSpecial "CTRL-Insert" 99071d4279SBram Moolenaarsyn match helpSpecial "CTRL-Del" 100071d4279SBram Moolenaarsyn match helpSpecial "CTRL-{char}" 101071d4279SBram Moolenaarsyn region helpNotVi start="{Vi[: ]" start="{not" start="{only" end="}" contains=helpLeadBlank,helpHyperTextJump 102071d4279SBram Moolenaarsyn match helpLeadBlank "^\s\+" contained 103071d4279SBram Moolenaar 104071d4279SBram Moolenaar" Highlight group items in their own color. 105071d4279SBram Moolenaarsyn match helpComment "\t[* ]Comment\t\+[a-z].*" 106071d4279SBram Moolenaarsyn match helpConstant "\t[* ]Constant\t\+[a-z].*" 107071d4279SBram Moolenaarsyn match helpString "\t[* ]String\t\+[a-z].*" 108071d4279SBram Moolenaarsyn match helpCharacter "\t[* ]Character\t\+[a-z].*" 109071d4279SBram Moolenaarsyn match helpNumber "\t[* ]Number\t\+[a-z].*" 110071d4279SBram Moolenaarsyn match helpBoolean "\t[* ]Boolean\t\+[a-z].*" 111071d4279SBram Moolenaarsyn match helpFloat "\t[* ]Float\t\+[a-z].*" 112071d4279SBram Moolenaarsyn match helpIdentifier "\t[* ]Identifier\t\+[a-z].*" 113071d4279SBram Moolenaarsyn match helpFunction "\t[* ]Function\t\+[a-z].*" 114071d4279SBram Moolenaarsyn match helpStatement "\t[* ]Statement\t\+[a-z].*" 115071d4279SBram Moolenaarsyn match helpConditional "\t[* ]Conditional\t\+[a-z].*" 116071d4279SBram Moolenaarsyn match helpRepeat "\t[* ]Repeat\t\+[a-z].*" 117071d4279SBram Moolenaarsyn match helpLabel "\t[* ]Label\t\+[a-z].*" 118071d4279SBram Moolenaarsyn match helpOperator "\t[* ]Operator\t\+["a-z].*" 119071d4279SBram Moolenaarsyn match helpKeyword "\t[* ]Keyword\t\+[a-z].*" 120071d4279SBram Moolenaarsyn match helpException "\t[* ]Exception\t\+[a-z].*" 121071d4279SBram Moolenaarsyn match helpPreProc "\t[* ]PreProc\t\+[a-z].*" 122071d4279SBram Moolenaarsyn match helpInclude "\t[* ]Include\t\+[a-z].*" 123071d4279SBram Moolenaarsyn match helpDefine "\t[* ]Define\t\+[a-z].*" 124071d4279SBram Moolenaarsyn match helpMacro "\t[* ]Macro\t\+[a-z].*" 125071d4279SBram Moolenaarsyn match helpPreCondit "\t[* ]PreCondit\t\+[a-z].*" 126071d4279SBram Moolenaarsyn match helpType "\t[* ]Type\t\+[a-z].*" 127071d4279SBram Moolenaarsyn match helpStorageClass "\t[* ]StorageClass\t\+[a-z].*" 128071d4279SBram Moolenaarsyn match helpStructure "\t[* ]Structure\t\+[a-z].*" 129071d4279SBram Moolenaarsyn match helpTypedef "\t[* ]Typedef\t\+[Aa-z].*" 130071d4279SBram Moolenaarsyn match helpSpecial "\t[* ]Special\t\+[a-z].*" 131071d4279SBram Moolenaarsyn match helpSpecialChar "\t[* ]SpecialChar\t\+[a-z].*" 132071d4279SBram Moolenaarsyn match helpTag "\t[* ]Tag\t\+[a-z].*" 133071d4279SBram Moolenaarsyn match helpDelimiter "\t[* ]Delimiter\t\+[a-z].*" 134071d4279SBram Moolenaarsyn match helpSpecialComment "\t[* ]SpecialComment\t\+[a-z].*" 135071d4279SBram Moolenaarsyn match helpDebug "\t[* ]Debug\t\+[a-z].*" 136071d4279SBram Moolenaarsyn match helpUnderlined "\t[* ]Underlined\t\+[a-z].*" 137071d4279SBram Moolenaarsyn match helpError "\t[* ]Error\t\+[a-z].*" 138071d4279SBram Moolenaarsyn match helpTodo "\t[* ]Todo\t\+[a-z].*" 139071d4279SBram Moolenaar 1403991dab8SBram Moolenaarsyn match helpURL `\v<(((https?|ftp|gopher)://|(mailto|file|news):)[^' <>"]+|(www|web|w3)[a-z0-9_-]*\.[a-z0-9._-]+\.[^' <>"]+)[a-zA-Z0-9/]` 141071d4279SBram Moolenaar 142071d4279SBram Moolenaar" Additionally load a language-specific syntax file "help_ab.vim". 14313fcaaf1SBram Moolenaarlet s:i = match(expand("%"), '\.\a\ax$') 14413fcaaf1SBram Moolenaarif s:i > 0 14513fcaaf1SBram Moolenaar exe "runtime syntax/help_" . strpart(expand("%"), s:i + 1, 2) . ".vim" 146071d4279SBram Moolenaarendif 147071d4279SBram Moolenaar 148d04b7507SBram Moolenaar" Italian 1497abcaab7SBram Moolenaarif v:lang =~ '\<IT\>' || v:lang =~ '_IT\>' || v:lang =~? "italian" 1507abcaab7SBram Moolenaar syn keyword helpNote nota Nota NOTA nota: Nota: NOTA: notare Notare NOTARE notare: Notare: NOTARE: 151d04b7507SBram Moolenaar syn match helpSpecial "Nma"me=e-2 152d04b7507SBram Moolenaar syn match helpSpecial "Nme"me=e-2 153d04b7507SBram Moolenaar syn match helpSpecial "Nmi"me=e-2 154d04b7507SBram Moolenaar syn match helpSpecial "Nmo"me=e-2 155d04b7507SBram Moolenaar syn match helpSpecial "\[interv.]" 156d04b7507SBram Moolenaar syn region helpNotVi start="{non" start="{solo" start="{disponibile" end="}" contains=helpLeadBlank,helpHyperTextJump 157d04b7507SBram Moolenaarendif 158d04b7507SBram Moolenaar 159071d4279SBram Moolenaarsyn sync minlines=40 160071d4279SBram Moolenaar 161071d4279SBram Moolenaar 162071d4279SBram Moolenaar" Define the default highlighting. 163d857f0e0SBram Moolenaar" Only used when an item doesn't have highlighting yet 164d857f0e0SBram Moolenaarhi def link helpIgnore Ignore 16536782084SBram Moolenaarhi def link helpHyperTextJump Identifier 16618144c84SBram Moolenaarhi def link helpBar Ignore 167fa13eef3SBram Moolenaarhi def link helpBacktick Ignore 1687fc904b6SBram Moolenaarhi def link helpStar Ignore 169d857f0e0SBram Moolenaarhi def link helpHyperTextEntry String 170d857f0e0SBram Moolenaarhi def link helpHeadline Statement 171d857f0e0SBram Moolenaarhi def link helpHeader PreProc 172d857f0e0SBram Moolenaarhi def link helpSectionDelim PreProc 173d857f0e0SBram Moolenaarhi def link helpVim Identifier 174d38b055aSBram Moolenaarhi def link helpCommand Comment 175d857f0e0SBram Moolenaarhi def link helpExample Comment 176d857f0e0SBram Moolenaarhi def link helpOption Type 177d857f0e0SBram Moolenaarhi def link helpNotVi Special 178d857f0e0SBram Moolenaarhi def link helpSpecial Special 179d857f0e0SBram Moolenaarhi def link helpNote Todo 18064d8e25bSBram Moolenaarhi def link helpWarning Todo 1813ec574f2SBram Moolenaarhi def link helpDeprecated Todo 182071d4279SBram Moolenaar 183d857f0e0SBram Moolenaarhi def link helpComment Comment 184d857f0e0SBram Moolenaarhi def link helpConstant Constant 185d857f0e0SBram Moolenaarhi def link helpString String 186d857f0e0SBram Moolenaarhi def link helpCharacter Character 187d857f0e0SBram Moolenaarhi def link helpNumber Number 188d857f0e0SBram Moolenaarhi def link helpBoolean Boolean 189d857f0e0SBram Moolenaarhi def link helpFloat Float 190d857f0e0SBram Moolenaarhi def link helpIdentifier Identifier 191d857f0e0SBram Moolenaarhi def link helpFunction Function 192d857f0e0SBram Moolenaarhi def link helpStatement Statement 193d857f0e0SBram Moolenaarhi def link helpConditional Conditional 194d857f0e0SBram Moolenaarhi def link helpRepeat Repeat 195d857f0e0SBram Moolenaarhi def link helpLabel Label 196d857f0e0SBram Moolenaarhi def link helpOperator Operator 197d857f0e0SBram Moolenaarhi def link helpKeyword Keyword 198d857f0e0SBram Moolenaarhi def link helpException Exception 199d857f0e0SBram Moolenaarhi def link helpPreProc PreProc 200d857f0e0SBram Moolenaarhi def link helpInclude Include 201d857f0e0SBram Moolenaarhi def link helpDefine Define 202d857f0e0SBram Moolenaarhi def link helpMacro Macro 203d857f0e0SBram Moolenaarhi def link helpPreCondit PreCondit 204d857f0e0SBram Moolenaarhi def link helpType Type 205d857f0e0SBram Moolenaarhi def link helpStorageClass StorageClass 206d857f0e0SBram Moolenaarhi def link helpStructure Structure 207d857f0e0SBram Moolenaarhi def link helpTypedef Typedef 208d857f0e0SBram Moolenaarhi def link helpSpecialChar SpecialChar 209d857f0e0SBram Moolenaarhi def link helpTag Tag 210d857f0e0SBram Moolenaarhi def link helpDelimiter Delimiter 211d857f0e0SBram Moolenaarhi def link helpSpecialComment SpecialComment 212d857f0e0SBram Moolenaarhi def link helpDebug Debug 213d857f0e0SBram Moolenaarhi def link helpUnderlined Underlined 214d857f0e0SBram Moolenaarhi def link helpError Error 215d857f0e0SBram Moolenaarhi def link helpTodo Todo 216e344beadSBram Moolenaarhi def link helpURL String 217071d4279SBram Moolenaar 218071d4279SBram Moolenaarlet b:current_syntax = "help" 219071d4279SBram Moolenaar 2206ee8d89cSBram Moolenaarlet &cpo = s:cpo_save 2216ee8d89cSBram Moolenaarunlet s:cpo_save 222071d4279SBram Moolenaar" vim: ts=8 sw=2 223