Mercurial > vim
comparison runtime/syntax/csc.vim @ 10048:43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Aug 30 23:26:57 2016 +0200
Updated runtime files. Remove version checks for Vim older than 6.0.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 30 Aug 2016 23:30:09 +0200 |
parents | 91e53bcb7946 |
children | 46763b01cd9a |
comparison
equal
deleted
inserted
replaced
10047:a62862410ca1 | 10048:43efa4f5a8ea |
---|---|
1 " Vim syntax file | 1 " Vim syntax file |
2 " Language: Essbase script | 2 " Language: Essbase script |
3 " Maintainer: Raul Segura Acevedo <raulseguraaceved@netscape.net> | 3 " Maintainer: Raul Segura Acevedo <raulseguraaceved@netscape.net> |
4 " Last change: 2011 Dec 25 by Thilo Six | 4 " Last change: 2011 Dec 25 by Thilo Six |
5 | 5 |
6 " For version 5.x: Clear all syntax items | 6 " quit when a syntax file was already loaded |
7 " For version 6.x: Quit when a syntax file was already loaded | 7 if exists("b:current_syntax") |
8 if version < 600 | |
9 syntax clear | |
10 elseif exists("b:current_syntax") | |
11 finish | 8 finish |
12 endif | 9 endif |
13 | 10 |
14 let s:cpo_save = &cpo | 11 let s:cpo_save = &cpo |
15 set cpo&vim | 12 set cpo&vim |
143 sy keyword cscBPMacro contained EndLoop AllMembers SelectedMembers If Else EndIf | 140 sy keyword cscBPMacro contained EndLoop AllMembers SelectedMembers If Else EndIf |
144 sy match cscBPMacro contained "!" | 141 sy match cscBPMacro contained "!" |
145 sy match cscBPW "!\s*\a*" contains=cscBPmacro | 142 sy match cscBPW "!\s*\a*" contains=cscBPmacro |
146 | 143 |
147 " when wanted, highlighting lhs members or erros in asignments (may lag the editing) | 144 " when wanted, highlighting lhs members or erros in asignments (may lag the editing) |
148 if version >= 600 && exists("csc_asignment") | 145 if exists("csc_asignment") |
149 sy match cscEqError '\("[^"]*"\s*\|[^][\t !%()*+,--/:;<=>{}~]\+\s*\|->\s*\)*=\([^=]\@=\|$\)' | 146 sy match cscEqError '\("[^"]*"\s*\|[^][\t !%()*+,--/:;<=>{}~]\+\s*\|->\s*\)*=\([^=]\@=\|$\)' |
150 sy region cscFormula transparent matchgroup=cscVarName start='\("[^"]*"\|[^][\t !%()*+,--/:;<=>{}~]\+\)\s*=\([^=]\@=\|\n\)' skip='"[^"]*"' end=';' contains=ALLBUT,cscFormula,cscFormulaIn,cscBPMacro,cscCondition | 147 sy region cscFormula transparent matchgroup=cscVarName start='\("[^"]*"\|[^][\t !%()*+,--/:;<=>{}~]\+\)\s*=\([^=]\@=\|\n\)' skip='"[^"]*"' end=';' contains=ALLBUT,cscFormula,cscFormulaIn,cscBPMacro,cscCondition |
151 sy region cscFormulaIn matchgroup=cscVarName transparent start='\("[^"]*"\|[^][\t !%()*+,--/:;<=>{}~]\+\)\(->\("[^"]*"\|[^][\t !%()*+,--/:;<=>{}~]\+\)\)*\s*=\([^=]\@=\|$\)' skip='"[^"]*"' end=';' contains=ALLBUT,cscFormula,cscFormulaIn,cscBPMacro,cscCondition contained | 148 sy region cscFormulaIn matchgroup=cscVarName transparent start='\("[^"]*"\|[^][\t !%()*+,--/:;<=>{}~]\+\)\(->\("[^"]*"\|[^][\t !%()*+,--/:;<=>{}~]\+\)\)*\s*=\([^=]\@=\|$\)' skip='"[^"]*"' end=';' contains=ALLBUT,cscFormula,cscFormulaIn,cscBPMacro,cscCondition contained |
152 sy match cscEq "==" | 149 sy match cscEq "==" |
153 endif | 150 endif |
156 let csc_minlines = 50 " mostly for () constructs | 153 let csc_minlines = 50 " mostly for () constructs |
157 endif | 154 endif |
158 exec "sy sync ccomment cscComment minlines=" . csc_minlines | 155 exec "sy sync ccomment cscComment minlines=" . csc_minlines |
159 | 156 |
160 " Define the default highlighting. | 157 " Define the default highlighting. |
161 " For version 5.7 and earlier: only when not done already | 158 " Only when an item doesn't have highlighting yet |
162 " For version 5.8 and later: only when an item doesn't have highlighting yet | 159 command -nargs=+ HiLink hi def link <args> |
163 if version >= 508 || !exists("did_csc_syntax_inits") | |
164 if version < 508 | |
165 let did_csc_syntax_inits = 1 | |
166 command -nargs=+ HiLink hi link <args> | |
167 else | |
168 command -nargs=+ HiLink hi def link <args> | |
169 endif | |
170 | 160 |
171 hi cscVarName term=bold ctermfg=9 gui=bold guifg=blue | 161 hi cscVarName term=bold ctermfg=9 gui=bold guifg=blue |
172 | 162 |
173 HiLink cscNumber Number | 163 HiLink cscNumber Number |
174 HiLink cscOctal Number | 164 HiLink cscOctal Number |
175 HiLink cscFloat Float | 165 HiLink cscFloat Float |
176 HiLink cscParenE Error | 166 HiLink cscParenE Error |
177 HiLink cscCommentE Error | 167 HiLink cscCommentE Error |
178 HiLink cscSpaceE Error | 168 HiLink cscSpaceE Error |
179 HiLink cscError Error | 169 HiLink cscError Error |
180 HiLink cscString String | 170 HiLink cscString String |
181 HiLink cscComment Comment | 171 HiLink cscComment Comment |
182 HiLink cscTodo Todo | 172 HiLink cscTodo Todo |
183 HiLink cscStatement Statement | 173 HiLink cscStatement Statement |
184 HiLink cscIfError Error | 174 HiLink cscIfError Error |
185 HiLink cscEqError Error | 175 HiLink cscEqError Error |
186 HiLink cscFunction Statement | 176 HiLink cscFunction Statement |
187 HiLink cscCondition Statement | 177 HiLink cscCondition Statement |
188 HiLink cscWarn WarningMsg | 178 HiLink cscWarn WarningMsg |
189 | 179 |
190 HiLink cscComE Error | 180 HiLink cscComE Error |
191 HiLink cscCom Statement | 181 HiLink cscCom Statement |
192 HiLink cscComW WarningMsg | 182 HiLink cscComW WarningMsg |
193 | 183 |
194 HiLink cscBPMacro Identifier | 184 HiLink cscBPMacro Identifier |
195 HiLink cscBPW WarningMsg | 185 HiLink cscBPW WarningMsg |
196 | 186 |
197 delcommand HiLink | 187 delcommand HiLink |
198 endif | |
199 | 188 |
200 let b:current_syntax = "csc" | 189 let b:current_syntax = "csc" |
201 | 190 |
202 let &cpo = s:cpo_save | 191 let &cpo = s:cpo_save |
203 unlet s:cpo_save | 192 unlet s:cpo_save |