annotate runtime/syntax/rc.vim @ 9291:bff3cd5cf922 v7.4.1928

commit https://github.com/vim/vim/commit/76ae22fef3cb224ca7fbf97517f881e825d4d0c2 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jun 13 20:00:29 2016 +0200 patch 7.4.1928 Problem: Overwriting pointer argument. Solution: Assign to what it points to. (Dominique Pelle)
author Christian Brabandt <cb@256bit.org>
date Mon, 13 Jun 2016 20:15:06 +0200
parents 0303182665d5
children 43efa4f5a8ea
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)
6823
0303182665d5 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
3 " Maintainer: Christian Brabandt
0303182665d5 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
4 " Last Change: 2015-05-29
0303182665d5 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
5 " Repository: https://github.com/chrisbra/vim-rc-syntax
0303182665d5 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
6 " License: Vim (see :h license)
0303182665d5 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
7 " Previous Maintainer: Heiko Erhardt <Heiko.Erhardt@munich.netsurf.de>
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 " This file is based on the c.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 " Common RC keywords
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 syn keyword rcLanguage LANGUAGE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn keyword rcMainObject TEXTINCLUDE VERSIONINFO BITMAP ICON CURSOR CURSOR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn keyword rcMainObject MENU ACCELERATORS TOOLBAR DIALOG
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn keyword rcMainObject STRINGTABLE MESSAGETABLE RCDATA DLGINIT DESIGNINFO
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn keyword rcSubObject POPUP MENUITEM SEPARATOR
6823
0303182665d5 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
27 syn keyword rcSubObject CONTROL LTEXT CTEXT RTEXT EDITTEXT
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn keyword rcSubObject BUTTON PUSHBUTTON DEFPUSHBUTTON GROUPBOX LISTBOX COMBOBOX
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn keyword rcSubObject FILEVERSION PRODUCTVERSION FILEFLAGSMASK FILEFLAGS FILEOS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn keyword rcSubObject FILETYPE FILESUBTYPE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn keyword rcCaptionParam CAPTION
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn keyword rcParam CHARACTERISTICS CLASS STYLE EXSTYLE VERSION FONT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn keyword rcStatement BEGIN END BLOCK VALUE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn keyword rcCommonAttribute PRELOAD LOADONCALL FIXED MOVEABLE DISCARDABLE PURE IMPURE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 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
40 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
41 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
42 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
43 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
44 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
45 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
46 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
47 syn keyword rcAttribute WS_EX_APPWINDOW WS_EX_OVERLAPPEDWINDOW WS_EX_PALETTEWINDOW
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 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
49 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
50 syn keyword rcAttribute ES_NUMBER
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 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
52 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
53 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
54 syn keyword rcAttribute BS_PUSHLIKE BS_MULTILINE BS_NOTIFY BS_FLAT BS_RIGHTBUTTON
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 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
56 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
57 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
58 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
59 syn keyword rcAttribute SS_SUNKEN SS_ENDELLIPSIS SS_PATHELLIPSIS SS_WORDELLIPSIS SS_ELLIPSISMASK
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 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
61 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
62 syn keyword rcAttribute DS_CENTERMOUSE DS_CONTEXTHELP
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 syn keyword rcAttribute LBS_NOTIFY LBS_SORT LBS_NOREDRAW LBS_MULTIPLESEL LBS_OWNERDRAWFIXED
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 syn keyword rcAttribute LBS_OWNERDRAWVARIABLE LBS_HASSTRINGS LBS_USETABSTOPS LBS_NOINTEGRALHEIGHT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 syn keyword rcAttribute LBS_MULTICOLUMN LBS_WANTKEYBOARDINPUT LBS_EXTENDEDSEL LBS_DISABLENOSCROLL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 syn keyword rcAttribute LBS_NODATA LBS_NOSEL LBS_STANDARD
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 syn keyword rcAttribute CBS_SIMPLE CBS_DROPDOWN CBS_DROPDOWNLIST CBS_OWNERDRAWFIXED CBS_OWNERDRAWVARIABLE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 syn keyword rcAttribute CBS_AUTOHSCROLL CBS_OEMCONVERT CBS_SORT CBS_HASSTRINGS CBS_NOINTEGRALHEIGHT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 syn keyword rcAttribute CBS_DISABLENOSCROLL CBS_UPPERCASE CBS_LOWERCASE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 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
71 syn keyword rcAttribute SBS_SIZEBOXTOPLEFTALIGN SBS_SIZEBOXBOTTOMRIGHTALIGN SBS_SIZEBOX SBS_SIZEGRIP
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 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
73 syn keyword rcAttribute CCS_NODIVIDER
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 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
75 syn keyword rcAttribute LVS_SORTASCENDING LVS_SORTDESCENDING LVS_SHAREIMAGELISTS LVS_NOLABELWRAP
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 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
77 syn keyword rcAttribute LVS_ALIGNMASK LVS_OWNERDRAWFIXED LVS_NOCOLUMNHEADER LVS_NOSORTHEADER LVS_AUTOARRANGE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 syn keyword rcAttribute TVS_HASBUTTONS TVS_HASLINES TVS_LINESATROOT TVS_EDITLABELS TVS_DISABLEDRAGDROP
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 syn keyword rcAttribute TVS_SHOWSELALWAYS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 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
81 syn keyword rcAttribute TCS_RIGHTJUSTIFY TCS_FIXEDWIDTH TCS_RAGGEDRIGHT TCS_FOCUSONBUTTONDOWN
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 syn keyword rcAttribute TCS_OWNERDRAWFIXED TCS_TOOLTIPS TCS_FOCUSNEVER
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 syn keyword rcAttribute ACS_CENTER ACS_TRANSPARENT ACS_AUTOPLAY
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 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
85 syn keyword rcStdId IDI_WARNING IDI_ERROR IDI_INFORMATION
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 syn keyword rcStdId IDCANCEL IDABORT IDRETRY IDIGNORE IDYES IDNO IDCLOSE IDHELP IDC_STATIC
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 " Common RC keywords
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 " Common RC keywords
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 syn keyword rcTodo contained TODO FIXME XXX
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 " String and Character constants
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 " Highlight special characters (those which have a backslash) differently
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 syn match rcSpecial contained "\\[0-7][0-7][0-7]\=\|\\."
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 syn region rcString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=rcSpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 syn match rcCharacter "'[^\\]'"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 syn match rcSpecialCharacter "'\\.'"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 syn match rcSpecialCharacter "'\\[0-7][0-7]'"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 syn match rcSpecialCharacter "'\\[0-7][0-7][0-7]'"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 "catch errors caused by wrong parenthesis
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 syn region rcParen transparent start='(' end=')' contains=ALLBUT,rcParenError,rcIncluded,rcSpecial,rcTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 syn match rcParenError ")"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 syn match rcInParen contained "[{}]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 "integer number, or floating point number without a dot and with "f".
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 syn match rcNumber "\<\d\+\(u\=l\=\|lu\|f\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 "floating point number, with dot, optional exponent
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 syn match rcFloat "\<\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 "floating point number, starting with a dot, optional exponent
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113 syn match rcFloat "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 "floating point number, without dot, with exponent
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 syn match rcFloat "\<\d\+e[-+]\=\d\+[fl]\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116 "hex number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117 syn match rcNumber "\<0x[0-9a-f]\+\(u\=l\=\|lu\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118 "syn match rcIdentifier "\<[a-z_][a-z0-9_]*\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120 " flag an octal number with wrong digits
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121 syn match rcOctalError "\<0[0-7]*[89]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123 if exists("rc_comment_strings")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124 " A comment can contain rcString, rcCharacter and rcNumber.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125 " But a "*/" inside a rcString in a rcComment DOES end the comment! So we
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126 " need to use a special type of rcString: rcCommentString, which also ends on
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127 " "*/", and sees a "*" at the start of the line as comment again.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128 " Unfortunately this doesn't very well work for // type of comments :-(
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129 syntax match rcCommentSkip contained "^\s*\*\($\|\s\+\)"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130 syntax region rcCommentString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=rcSpecial,rcCommentSkip
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131 syntax region rcComment2String contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=rcSpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132 syntax region rcComment start="/\*" end="\*/" contains=rcTodo,rcCommentString,rcCharacter,rcNumber,rcFloat
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
133 syntax match rcComment "//.*" contains=rcTodo,rcComment2String,rcCharacter,rcNumber
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
134 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135 syn region rcComment start="/\*" end="\*/" contains=rcTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136 syn match rcComment "//.*" contains=rcTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
137 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
138 syntax match rcCommentError "\*/"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
140 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
141 syn region rcIncluded contained start=+"+ skip=+\\\\\|\\"+ end=+"+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
142 syn match rcIncluded contained "<[^>]*>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
143 syn match rcInclude "^\s*#\s*include\>\s*["<]" contains=rcIncluded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
144 "syn match rcLineSkip "\\$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
145 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
146 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
147
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
148 syn sync ccomment rcComment minlines=10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
149
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
150 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
151 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
152 " 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
153 if version >= 508 || !exists("did_rc_syntax_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
154 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
155 let did_rc_syntax_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
156 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
157 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
158 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
159 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
160
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
161 HiLink rcCharacter Character
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
162 HiLink rcSpecialCharacter rcSpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
163 HiLink rcNumber Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
164 HiLink rcFloat Float
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
165 HiLink rcOctalError rcError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
166 HiLink rcParenError rcError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
167 HiLink rcInParen rcError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
168 HiLink rcCommentError rcError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
169 HiLink rcInclude Include
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
170 HiLink rcPreProc PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
171 HiLink rcDefine Macro
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
172 HiLink rcIncluded rcString
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
173 HiLink rcError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
174 HiLink rcPreCondit PreCondit
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
175 HiLink rcCommentString rcString
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
176 HiLink rcComment2String rcString
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
177 HiLink rcCommentSkip rcComment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
178 HiLink rcString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
179 HiLink rcComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
180 HiLink rcSpecial SpecialChar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
181 HiLink rcTodo Todo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
182
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
183 HiLink rcAttribute rcCommonAttribute
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
184 HiLink rcStdId rcStatement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
185 HiLink rcStatement Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
186
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
187 " Default color overrides
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
188 hi def rcLanguage term=reverse ctermbg=Red ctermfg=Yellow guibg=Red guifg=Yellow
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
189 hi def rcMainObject term=underline ctermfg=Blue guifg=Blue
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
190 hi def rcSubObject ctermfg=Green guifg=Green
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
191 hi def rcCaptionParam term=underline ctermfg=DarkGreen guifg=Green
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
192 hi def rcParam ctermfg=DarkGreen guifg=DarkGreen
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
193 hi def rcStatement ctermfg=DarkGreen guifg=DarkGreen
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
194 hi def rcCommonAttribute ctermfg=Brown guifg=Brown
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
195
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
196 "HiLink rcIdentifier Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
197
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
198 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
199 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
200
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
201 let b:current_syntax = "rc"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
202
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
203 " vim: ts=8