Start anew
[msysgit.git] / share / vim / vim58 / syntax / help.vim
blobe6df9a578c137ffea333ec3695178b0afc33410e
1 " Vim syntax file
2 " Language:     Vim help file
3 " Maintainer:   Bram Moolenaar (Bram@vim.org)
4 " Last Change:  2001 Apr 25
6 " For version 5.x: Clear all syntax items
7 " For version 6.x: Quit when a syntax file was already loaded
8 if version < 600
9   syntax clear
10 elseif exists("b:current_syntax")
11   finish
12 endif
14 syn match helpHeadline          "^[A-Z ]\+[ ]\+\*"me=e-1
15 syn match helpSectionDelim      "^=\{3,}.*==$"
16 syn match helpSectionDelim      "^-\{3,}.*--$"
17 syn match helpExampleStart      "^>" nextgroup=helpExample
18 syn match helpExample           ".*" contained
19 syn match helpHyperTextJump     "|[#-)!+-~]\+|"
20 syn match helpHyperTextEntry    "\*[#-)!+-~]\+\*\s"he=e-1
21 syn match helpHyperTextEntry    "\*[#-)!+-~]\+\*$"
22 syn match helpVim               "Vim version [0-9.a-z]\+"
23 syn match helpVim               "VIM REFERENCE.*"
24 syn match helpOption            "'[a-z]\{2,\}'"
25 syn match helpOption            "'t_..'"
26 syn match helpHeader            ".*\~$"me=e-1 nextgroup=helpIgnore
27 syn match helpIgnore            "." contained
28 syn keyword helpNote            note Note NOTE note: Note: NOTE:
29 syn match helpSpecial           "\<N\>"
30 syn match helpSpecial           "(N\>"ms=s+1
31 syn match helpSpecial           "\[N]"
32 " avoid highlighting N  N in help.txt
33 syn match helpSpecial           "N  N"he=s+1
34 syn match helpSpecial           "Nth"me=e-2
35 syn match helpSpecial           "N-1"me=e-2
36 syn match helpSpecial           "{[-a-zA-Z0-9'":%#=[\]<>.]\+}"
37 syn match helpSpecial           "\s\[[-a-zA-Z0-9_]\{2,}]"ms=s+1
38 syn match helpSpecial           "<[-a-zA-Z0-9_]\+>"
39 syn match helpSpecial           "<[SCM]-.>"
40 syn match helpSpecial           "\[range]"
41 syn match helpSpecial           "\[line]"
42 syn match helpSpecial           "\[count]"
43 syn match helpSpecial           "\[offset]"
44 syn match helpSpecial           "\[cmd]"
45 syn match helpSpecial           "\[num]"
46 syn match helpSpecial           "\[+num]"
47 syn match helpSpecial           "\[-num]"
48 syn match helpSpecial           "CTRL-."
49 syn match helpSpecial           "CTRL-Break"
50 syn match helpSpecial           "CTRL-{char}"
51 syn region helpNotVi            start="{Vi[: ]" start="{not" start="{only" end="}" contains=helpLeadBlank,helpHyperTextJump
52 syn match helpLeadBlank         "^\s\+"
54 " Define the default highlighting.
55 " For version 5.7 and earlier: only when not done already
56 " For version 5.8 and later: only when an item doesn't have highlighting yet
57 if version >= 508 || !exists("did_help_syntax_inits")
58   if version < 508
59     let did_help_syntax_inits = 1
60     command -nargs=+ HiLink hi link <args>
61   else
62     command -nargs=+ HiLink hi def link <args>
63   endif
65   hi link helpExampleStart      helpIgnore
66   hi link helpIgnore            Ignore
67   hi link helpHyperTextJump     Subtitle
68   hi link helpHyperTextEntry    String
69   hi link helpHeadline          Statement
70   hi link helpHeader            PreProc
71   hi link helpSectionDelim      PreProc
72   hi link helpVim               Identifier
73   hi link helpExample           Comment
74   hi link helpOption            Type
75   hi link helpNotVi             Special
76   hi link helpSpecial           Special
77   hi link helpNote              Todo
78   hi link Subtitle              Identifier
80   delcommand HiLink
81 endif
83 let b:current_syntax = "help"
85 " vim: ts=8 sw=2