home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / unix / vim-6.2.tar.bz2 / vim-6.2.tar / vim62 / runtime / syntax / help.vim < prev    next >
Encoding:
Text File  |  2003-01-20  |  3.2 KB  |  100 lines

  1. " Vim syntax file
  2. " Language:    Vim help file
  3. " Maintainer:    Bram Moolenaar (Bram@vim.org)
  4. " Last Change:    2003 Jan 20
  5.  
  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
  13.  
  14. syn match helpHeadline        "^[A-Z ]\+[ ]\+\*"me=e-1
  15. syn match helpSectionDelim    "^=\{3,}.*===$"
  16. syn match helpSectionDelim    "^-\{3,}.*--$"
  17. syn region helpExample        matchgroup=helpIgnore start=" >$" start="^>$" end="^[^ \t]"me=e-1 end="^<"
  18. if has("ebcdic")
  19.   syn match helpHyperTextJump    "\\\@<!|[^"*|]\+|"
  20.   syn match helpHyperTextEntry    "\*[^"*|]\+\*\s"he=e-1
  21.   syn match helpHyperTextEntry    "\*[^"*|]\+\*$"
  22. else
  23.   syn match helpHyperTextJump    "\\\@<!|[#-)!+-~]\+|"
  24.   syn match helpHyperTextEntry    "\*[#-)!+-~]\+\*\s"he=e-1
  25.   syn match helpHyperTextEntry    "\*[#-)!+-~]\+\*$"
  26. endif
  27. syn match helpNormal        "|.*====*|"
  28. syn match helpVim        "Vim version [0-9.a-z]\+"
  29. syn match helpVim        "VIM REFERENCE.*"
  30. syn match helpOption        "'[a-z]\{2,\}'"
  31. syn match helpOption        "'t_..'"
  32. syn match helpHeader        ".*\~$"me=e-1 nextgroup=helpIgnore
  33. syn match helpIgnore        "." contained
  34. syn keyword helpNote        note Note NOTE note: Note: NOTE:
  35. syn match helpSpecial        "\<N\>"
  36. syn match helpSpecial        "(N\>"ms=s+1
  37. syn match helpSpecial        "\[N]"
  38. " avoid highlighting N  N in help.txt
  39. syn match helpSpecial        "N  N"he=s+1
  40. syn match helpSpecial        "Nth"me=e-2
  41. syn match helpSpecial        "N-1"me=e-2
  42. syn match helpSpecial        "{[-a-zA-Z0-9'":%#=[\]<>.,]\+}"
  43. syn match helpSpecial        "\s\[[-a-z^A-Z0-9_]\{2,}]"ms=s+1
  44. syn match helpSpecial        "<[-a-zA-Z0-9_]\+>"
  45. syn match helpSpecial        "<[SCM]-.>"
  46. syn match helpNormal        "<---*>"
  47. syn match helpSpecial        "\[range]"
  48. syn match helpSpecial        "\[line]"
  49. syn match helpSpecial        "\[count]"
  50. syn match helpSpecial        "\[offset]"
  51. syn match helpSpecial        "\[cmd]"
  52. syn match helpSpecial        "\[num]"
  53. syn match helpSpecial        "\[+num]"
  54. syn match helpSpecial        "\[-num]"
  55. syn match helpSpecial        "CTRL-."
  56. syn match helpSpecial        "CTRL-Break"
  57. syn match helpSpecial        "CTRL-PageUp"
  58. syn match helpSpecial        "CTRL-PageDown"
  59. syn match helpSpecial        "CTRL-Insert"
  60. syn match helpSpecial        "CTRL-Del"
  61. syn match helpSpecial        "CTRL-{char}"
  62. syn region helpNotVi        start="{Vi[: ]" start="{not" start="{only" end="}" contains=helpLeadBlank,helpHyperTextJump
  63. syn match helpLeadBlank        "^\s\+" contained
  64.  
  65. syn sync minlines=40
  66.  
  67.  
  68. " Define the default highlighting.
  69. " For version 5.7 and earlier: only when not done already
  70. " For version 5.8 and later: only when an item doesn't have highlighting yet
  71. if version >= 508 || !exists("did_help_syntax_inits")
  72.   if version < 508
  73.     let did_help_syntax_inits = 1
  74.     command -nargs=+ HiLink hi link <args>
  75.   else
  76.     command -nargs=+ HiLink hi def link <args>
  77.   endif
  78.  
  79.   HiLink helpExampleStart    helpIgnore
  80.   HiLink helpIgnore        Ignore
  81.   HiLink helpHyperTextJump    Subtitle
  82.   HiLink helpHyperTextEntry    String
  83.   HiLink helpHeadline        Statement
  84.   HiLink helpHeader        PreProc
  85.   HiLink helpSectionDelim    PreProc
  86.   HiLink helpVim        Identifier
  87.   HiLink helpExample        Comment
  88.   HiLink helpOption        Type
  89.   HiLink helpNotVi        Special
  90.   HiLink helpSpecial        Special
  91.   HiLink helpNote        Todo
  92.   HiLink Subtitle        Identifier
  93.  
  94.   delcommand HiLink
  95. endif
  96.  
  97. let b:current_syntax = "help"
  98.  
  99. " vim: ts=8 sw=2
  100.