summaryrefslogtreecommitdiffstats
path: root/.vim/after/syntax/help.vim
blob: bd7a073e5c556da5c61e07adfbde85935c33b125 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
"*****************************************************************************
"** Name:      help.vim - extend standard syntax highlighting for help      **
"**                                                                         **
"** Type:      syntax file                                                  **
"**                                                                         **
"** Author:    Christian Habermann                                          **
"**            christian (at) habermann-net (point) de                      **
"**                                                                         **
"** Copyright: (c) 2002-2004 by Christian Habermann                         **
"**                                                                         **
"** License:   GNU General Public License 2 (GPL 2) or later                **
"**                                                                         **
"**            This program is free software; you can redistribute it       **
"**            and/or modify it under the terms of the GNU General Public   **
"**            License as published by the Free Software Foundation; either **
"**            version 2 of the License, or (at your option) any later      **
"**            version.                                                     **
"**                                                                         **
"**            This program is distributed in the hope that it will be      **
"**            useful, but WITHOUT ANY WARRANTY; without even the implied   **
"**            warrenty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      **
"**            PURPOSE.                                                     **
"**            See the GNU General Public License for more details.         **
"**                                                                         **
"** Version:   1.0.1                                                        **
"**            tested under Linux and Win32, VIM and GVIM 6.2               **
"**                                                                         **
"** History:   0.1.0  12. Dec. 2002 - 21. Feb. 2003                         **
"**              initial version, not released                              **
"**            1.0.0   6. Apr. 2003                                         **
"**              no changes, first release                                  **
"**            1.0.1   3. Mar. 2004                                         **
"**              marker changed from 0xa7 to $ in order to avoid problems   **
"**              with fonts that use codes > 0x7f as multibyte characters   **
"**              (e.g. Chinese, Korean, Japanese... fonts)                  **
"**                                                                         **
"**                                                                         **
"*****************************************************************************
"** Description:                                                            **
"**   This syntax file extends the standard syntax highlighting for help    **
"**   files. This is needed in order to view the C-reference manual         **
"**   of the project CRefVim correctly.                                     **
"**   This syntax file is only active for the help file named               **
"**   "crefvim.txt". For other help files no extention on syntax            **
"**   highlighting is applied.                                              **
"**                                                                         **
"**   For futher information see crefvimdoc.txt or do :help crefvimdoc      **
"**                                                                         **
"**   Happy viming...                                                       **
"*****************************************************************************


" extend syntax-highlighting for "crefvim.txt" only (not case-sensitive)

if tolower(expand("%:t"))=="crefvim.txt"
    syn match helpCRVSubStatement  "statement[0-9Ns]*"   contained
    syn match helpCRVSubCondition  "condition[0-9]*"     contained
    syn match helpCRVSubExpression "expression[0-9]*"    contained
    syn match helpCRVSubExpr       "expr[0-9N]"          contained
    syn match helpCRVSubType       "type-name"           contained
    syn match helpCRVSubIdent      "identifier"          contained
    syn match helpCRVSubIdentList  "identifier-list"     contained
    syn match helpCRVSubOperand    "operand[0-9]*"       contained
    syn match helpCRVSubConstExpr  "constant-expression[1-9Ns]*" contained
    syn match helpCRVSubClassSpec  "storage-class-specifier"  contained
    syn match helpCRVSubTypeSpec   "type-specifier"      contained
    syn match helpCRVSubEnumList   "enumerator-list"     contained
    syn match helpCRVSubDecl       "declarator"          contained
    syn match helpCRVSubRetType    "return-type"         contained
    syn match helpCRVSubFuncName   "function-name"       contained
    syn match helpCRVSubParamList  "parameter-list"      contained
    syn match helpCRVSubReplList   "replacement-list"    contained
    syn match helpCRVSubNewLine    "newline"             contained
    syn match helpCRVSubMessage    "message"             contained
    syn match helpCRVSubFilename   "filename"            contained
    syn match helpCRVSubDigitSeq   "digit-sequence"      contained
    syn match helpCRVSubMacroNames "macro-name[s]*"      contained
    syn match helpCRVSubDirective  "directive"           contained


    syn match helpCRVignore     "\$[a-zA-Z0-9\\\*/\._=()\-+%<>&\^|!~\?:,\[\];{}#\'\" ]\+\$" contains=helpCRVstate
    syn match helpCRVstate      "[a-zA-Z0-9\\\*/\._=()\-+%<>&\^|!~\?:,\[\];{}#\'\" ]\+"   contained contains=helpCRVSub.*


    hi helpCRVitalic  term=italic cterm=italic gui=italic
    
    hi def link  helpCRVstate          Comment
    hi def link  helpCRVSubStatement   helpCRVitalic
    hi def link  helpCRVSubCondition   helpCRVitalic
    hi def link  helpCRVSubExpression  helpCRVitalic
    hi def link  helpCRVSubExpr        helpCRVitalic
    hi def link  helpCRVSubOperand     helpCRVitalic
    hi def link  helpCRVSubType        helpCRVitalic
    hi def link  helpCRVSubIdent       helpCRVitalic
    hi def link  helpCRVSubIdentList   helpCRVitalic
    hi def link  helpCRVSubConstExpr   helpCRVitalic
    hi def link  helpCRVSubClassSpec   helpCRVitalic
    hi def link  helpCRVSubTypeSpec    helpCRVitalic
    hi def link  helpCRVSubEnumList    helpCRVitalic
    hi def link  helpCRVSubDecl        helpCRVitalic
    hi def link  helpCRVSubRetType     helpCRVitalic
    hi def link  helpCRVSubFuncName    helpCRVitalic
    hi def link  helpCRVSubParamList   helpCRVitalic
    hi def link  helpCRVSubReplList    helpCRVitalic
    hi def link  helpCRVSubNewLine     helpCRVitalic
    hi def link  helpCRVSubMessage     helpCRVitalic
    hi def link  helpCRVSubFilename    helpCRVitalic
    hi def link  helpCRVSubDigitSeq    helpCRVitalic
    hi def link  helpCRVSubMacroNames  helpCRVitalic
    hi def link  helpCRVSubDirective   helpCRVitalic
    hi def link  helpCRVignore         Ignore
endif

" vim: ts=8 sw=2