annotate runtime/syntax/rc.vim @ 358:e111db373ca4

updated for version 7.0093
author vimboss
date Sat, 25 Jun 2005 22:49:46 +0000
parents 3fc0f57ecb91
children 0303182665d5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: M$ Resource files (*.rc)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Heiko Erhardt <Heiko.Erhardt@munich.netsurf.de>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Last Change: 2001 May 09
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " This file is based on the c.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 " Common RC keywords
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 syn keyword rcLanguage LANGUAGE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 syn keyword rcMainObject TEXTINCLUDE VERSIONINFO BITMAP ICON CURSOR CURSOR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 syn keyword rcMainObject MENU ACCELERATORS TOOLBAR DIALOG
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn keyword rcMainObject STRINGTABLE MESSAGETABLE RCDATA DLGINIT DESIGNINFO
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn keyword rcSubObject POPUP MENUITEM SEPARATOR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn keyword rcSubObject CONTROL LTEXT CTEXT EDITTEXT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn keyword rcSubObject BUTTON PUSHBUTTON DEFPUSHBUTTON GROUPBOX LISTBOX COMBOBOX
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn keyword rcSubObject FILEVERSION PRODUCTVERSION FILEFLAGSMASK FILEFLAGS FILEOS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn keyword rcSubObject FILETYPE FILESUBTYPE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn keyword rcCaptionParam CAPTION
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn keyword rcParam CHARACTERISTICS CLASS STYLE EXSTYLE VERSION FONT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn keyword rcStatement BEGIN END BLOCK VALUE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn keyword rcCommonAttribute PRELOAD LOADONCALL FIXED MOVEABLE DISCARDABLE PURE IMPURE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn keyword rcAttribute WS_OVERLAPPED WS_POPUP WS_CHILD WS_MINIMIZE WS_VISIBLE WS_DISABLED WS_CLIPSIBLINGS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn keyword rcAttribute WS_CLIPCHILDREN WS_MAXIMIZE WS_CAPTION WS_BORDER WS_DLGFRAME WS_VSCROLL WS_HSCROLL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn keyword rcAttribute WS_SYSMENU WS_THICKFRAME WS_GROUP WS_TABSTOP WS_MINIMIZEBOX WS_MAXIMIZEBOX WS_TILED
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn keyword rcAttribute WS_ICONIC WS_SIZEBOX WS_TILEDWINDOW WS_OVERLAPPEDWINDOW WS_POPUPWINDOW WS_CHILDWINDOW
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn keyword rcAttribute WS_EX_DLGMODALFRAME WS_EX_NOPARENTNOTIFY WS_EX_TOPMOST WS_EX_ACCEPTFILES
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn keyword rcAttribute WS_EX_TRANSPARENT WS_EX_MDICHILD WS_EX_TOOLWINDOW WS_EX_WINDOWEDGE WS_EX_CLIENTEDGE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn keyword rcAttribute WS_EX_CONTEXTHELP WS_EX_RIGHT WS_EX_LEFT WS_EX_RTLREADING WS_EX_LTRREADING
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn keyword rcAttribute WS_EX_LEFTSCROLLBAR WS_EX_RIGHTSCROLLBAR WS_EX_CONTROLPARENT WS_EX_STATICEDGE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn keyword rcAttribute WS_EX_APPWINDOW WS_EX_OVERLAPPEDWINDOW WS_EX_PALETTEWINDOW
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn keyword rcAttribute ES_LEFT ES_CENTER ES_RIGHT ES_MULTILINE ES_UPPERCASE ES_LOWERCASE ES_PASSWORD
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn keyword rcAttribute ES_AUTOVSCROLL ES_AUTOHSCROLL ES_NOHIDESEL ES_OEMCONVERT ES_READONLY ES_WANTRETURN
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn keyword rcAttribute ES_NUMBER
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn keyword rcAttribute BS_PUSHBUTTON BS_DEFPUSHBUTTON BS_CHECKBOX BS_AUTOCHECKBOX BS_RADIOBUTTON BS_3STATE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn keyword rcAttribute BS_AUTO3STATE BS_GROUPBOX BS_USERBUTTON BS_AUTORADIOBUTTON BS_OWNERDRAW BS_LEFTTEXT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 syn keyword rcAttribute BS_TEXT BS_ICON BS_BITMAP BS_LEFT BS_RIGHT BS_CENTER BS_TOP BS_BOTTOM BS_VCENTER
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn keyword rcAttribute BS_PUSHLIKE BS_MULTILINE BS_NOTIFY BS_FLAT BS_RIGHTBUTTON
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn keyword rcAttribute SS_LEFT SS_CENTER SS_RIGHT SS_ICON SS_BLACKRECT SS_GRAYRECT SS_WHITERECT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 syn keyword rcAttribute SS_BLACKFRAME SS_GRAYFRAME SS_WHITEFRAME SS_USERITEM SS_SIMPLE SS_LEFTNOWORDWRAP
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 syn keyword rcAttribute SS_OWNERDRAW SS_BITMAP SS_ENHMETAFILE SS_ETCHEDHORZ SS_ETCHEDVERT SS_ETCHEDFRAME
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn keyword rcAttribute SS_TYPEMASK SS_NOPREFIX SS_NOTIFY SS_CENTERIMAGE SS_RIGHTJUST SS_REALSIZEIMAGE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 syn keyword rcAttribute SS_SUNKEN SS_ENDELLIPSIS SS_PATHELLIPSIS SS_WORDELLIPSIS SS_ELLIPSISMASK
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 syn keyword rcAttribute DS_ABSALIGN DS_SYSMODAL DS_LOCALEDIT DS_SETFONT DS_MODALFRAME DS_NOIDLEMSG
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syn keyword rcAttribute DS_SETFOREGROUND DS_3DLOOK DS_FIXEDSYS DS_NOFAILCREATE DS_CONTROL DS_CENTER
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 syn keyword rcAttribute DS_CENTERMOUSE DS_CONTEXTHELP
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 syn keyword rcAttribute LBS_NOTIFY LBS_SORT LBS_NOREDRAW LBS_MULTIPLESEL LBS_OWNERDRAWFIXED
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 syn keyword rcAttribute LBS_OWNERDRAWVARIABLE LBS_HASSTRINGS LBS_USETABSTOPS LBS_NOINTEGRALHEIGHT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 syn keyword rcAttribute LBS_MULTICOLUMN LBS_WANTKEYBOARDINPUT LBS_EXTENDEDSEL LBS_DISABLENOSCROLL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 syn keyword rcAttribute LBS_NODATA LBS_NOSEL LBS_STANDARD
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 syn keyword rcAttribute CBS_SIMPLE CBS_DROPDOWN CBS_DROPDOWNLIST CBS_OWNERDRAWFIXED CBS_OWNERDRAWVARIABLE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 syn keyword rcAttribute CBS_AUTOHSCROLL CBS_OEMCONVERT CBS_SORT CBS_HASSTRINGS CBS_NOINTEGRALHEIGHT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 syn keyword rcAttribute CBS_DISABLENOSCROLL CBS_UPPERCASE CBS_LOWERCASE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 syn keyword rcAttribute SBS_HORZ SBS_VERT SBS_TOPALIGN SBS_LEFTALIGN SBS_BOTTOMALIGN SBS_RIGHTALIGN
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 syn keyword rcAttribute SBS_SIZEBOXTOPLEFTALIGN SBS_SIZEBOXBOTTOMRIGHTALIGN SBS_SIZEBOX SBS_SIZEGRIP
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 syn keyword rcAttribute CCS_TOP CCS_NOMOVEY CCS_BOTTOM CCS_NORESIZE CCS_NOPARENTALIGN CCS_ADJUSTABLE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 syn keyword rcAttribute CCS_NODIVIDER
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 syn keyword rcAttribute LVS_ICON LVS_REPORT LVS_SMALLICON LVS_LIST LVS_TYPEMASK LVS_SINGLESEL LVS_SHOWSELALWAYS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 syn keyword rcAttribute LVS_SORTASCENDING LVS_SORTDESCENDING LVS_SHAREIMAGELISTS LVS_NOLABELWRAP
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 syn keyword rcAttribute LVS_EDITLABELS LVS_OWNERDATA LVS_NOSCROLL LVS_TYPESTYLEMASK LVS_ALIGNTOP LVS_ALIGNLEFT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 syn keyword rcAttribute LVS_ALIGNMASK LVS_OWNERDRAWFIXED LVS_NOCOLUMNHEADER LVS_NOSORTHEADER LVS_AUTOARRANGE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 syn keyword rcAttribute TVS_HASBUTTONS TVS_HASLINES TVS_LINESATROOT TVS_EDITLABELS TVS_DISABLEDRAGDROP
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 syn keyword rcAttribute TVS_SHOWSELALWAYS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 syn keyword rcAttribute TCS_FORCEICONLEFT TCS_FORCELABELLEFT TCS_TABS TCS_BUTTONS TCS_SINGLELINE TCS_MULTILINE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 syn keyword rcAttribute TCS_RIGHTJUSTIFY TCS_FIXEDWIDTH TCS_RAGGEDRIGHT TCS_FOCUSONBUTTONDOWN
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 syn keyword rcAttribute TCS_OWNERDRAWFIXED TCS_TOOLTIPS TCS_FOCUSNEVER
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 syn keyword rcAttribute ACS_CENTER ACS_TRANSPARENT ACS_AUTOPLAY
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 syn keyword rcStdId IDI_APPLICATION IDI_HAND IDI_QUESTION IDI_EXCLAMATION IDI_ASTERISK IDI_WINLOGO IDI_WINLOGO
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 syn keyword rcStdId IDI_WARNING IDI_ERROR IDI_INFORMATION
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 syn keyword rcStdId IDCANCEL IDABORT IDRETRY IDIGNORE IDYES IDNO IDCLOSE IDHELP IDC_STATIC
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 " Common RC keywords
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 " Common RC keywords
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 syn keyword rcTodo contained TODO FIXME XXX
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 " String and Character constants
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 " Highlight special characters (those which have a backslash) differently
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 syn match rcSpecial contained "\\[0-7][0-7][0-7]\=\|\\."
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 syn region rcString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=rcSpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 syn match rcCharacter "'[^\\]'"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 syn match rcSpecialCharacter "'\\.'"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 syn match rcSpecialCharacter "'\\[0-7][0-7]'"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 syn match rcSpecialCharacter "'\\[0-7][0-7][0-7]'"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 "catch errors caused by wrong parenthesis
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 syn region rcParen transparent start='(' end=')' contains=ALLBUT,rcParenError,rcIncluded,rcSpecial,rcTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 syn match rcParenError ")"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 syn match rcInParen contained "[{}]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 "integer number, or floating point number without a dot and with "f".
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 syn match rcNumber "\<\d\+\(u\=l\=\|lu\|f\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 "floating point number, with dot, optional exponent
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 syn match rcFloat "\<\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 "floating point number, starting with a dot, optional exponent
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 syn match rcFloat "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 "floating point number, without dot, with exponent
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 syn match rcFloat "\<\d\+e[-+]\=\d\+[fl]\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113 "hex number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 syn match rcNumber "\<0x[0-9a-f]\+\(u\=l\=\|lu\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 "syn match rcIdentifier "\<[a-z_][a-z0-9_]*\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117 " flag an octal number with wrong digits
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118 syn match rcOctalError "\<0[0-7]*[89]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120 if exists("rc_comment_strings")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121 " A comment can contain rcString, rcCharacter and rcNumber.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122 " But a "*/" inside a rcString in a rcComment DOES end the comment! So we
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123 " need to use a special type of rcString: rcCommentString, which also ends on
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124 " "*/", and sees a "*" at the start of the line as comment again.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125 " Unfortunately this doesn't very well work for // type of comments :-(
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126 syntax match rcCommentSkip contained "^\s*\*\($\|\s\+\)"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127 syntax region rcCommentString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=rcSpecial,rcCommentSkip
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128 syntax region rcComment2String contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=rcSpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129 syntax region rcComment start="/\*" end="\*/" contains=rcTodo,rcCommentString,rcCharacter,rcNumber,rcFloat
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130 syntax match rcComment "//.*" contains=rcTodo,rcComment2String,rcCharacter,rcNumber
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132 syn region rcComment start="/\*" end="\*/" contains=rcTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
133 syn match rcComment "//.*" contains=rcTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
134 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135 syntax match rcCommentError "\*/"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
137 syn region rcPreCondit start="^\s*#\s*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=rcComment,rcString,rcCharacter,rcNumber,rcCommentError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
138 syn region rcIncluded contained start=+"+ skip=+\\\\\|\\"+ end=+"+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139 syn match rcIncluded contained "<[^>]*>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
140 syn match rcInclude "^\s*#\s*include\>\s*["<]" contains=rcIncluded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
141 "syn match rcLineSkip "\\$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
142 syn region rcDefine start="^\s*#\s*\(define\>\|undef\>\)" skip="\\$" end="$" contains=ALLBUT,rcPreCondit,rcIncluded,rcInclude,rcDefine,rcInParen
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
143 syn region rcPreProc start="^\s*#\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" contains=ALLBUT,rcPreCondit,rcIncluded,rcInclude,rcDefine,rcInParen
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
144
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
145 syn sync ccomment rcComment minlines=10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
146
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
147 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
148 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
149 " For version 5.8 and later: only when an item doesn't have highlighting yet
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
150 if version >= 508 || !exists("did_rc_syntax_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
151 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
152 let did_rc_syntax_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
153 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
154 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
155 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
156 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
157
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
158 HiLink rcCharacter Character
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
159 HiLink rcSpecialCharacter rcSpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
160 HiLink rcNumber Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
161 HiLink rcFloat Float
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
162 HiLink rcOctalError rcError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
163 HiLink rcParenError rcError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
164 HiLink rcInParen rcError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
165 HiLink rcCommentError rcError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
166 HiLink rcInclude Include
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
167 HiLink rcPreProc PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
168 HiLink rcDefine Macro
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
169 HiLink rcIncluded rcString
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
170 HiLink rcError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
171 HiLink rcPreCondit PreCondit
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
172 HiLink rcCommentString rcString
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
173 HiLink rcComment2String rcString
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
174 HiLink rcCommentSkip rcComment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
175 HiLink rcString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
176 HiLink rcComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
177 HiLink rcSpecial SpecialChar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
178 HiLink rcTodo Todo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
179
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
180 HiLink rcAttribute rcCommonAttribute
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
181 HiLink rcStdId rcStatement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
182 HiLink rcStatement Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
183
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
184 " Default color overrides
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
185 hi def rcLanguage term=reverse ctermbg=Red ctermfg=Yellow guibg=Red guifg=Yellow
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
186 hi def rcMainObject term=underline ctermfg=Blue guifg=Blue
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
187 hi def rcSubObject ctermfg=Green guifg=Green
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
188 hi def rcCaptionParam term=underline ctermfg=DarkGreen guifg=Green
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
189 hi def rcParam ctermfg=DarkGreen guifg=DarkGreen
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
190 hi def rcStatement ctermfg=DarkGreen guifg=DarkGreen
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
191 hi def rcCommonAttribute ctermfg=Brown guifg=Brown
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
192
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
193 "HiLink rcIdentifier Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
194
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
195 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
196 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
197
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
198 let b:current_syntax = "rc"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
199
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
200 " vim: ts=8