Mercurial > vim
comparison runtime/syntax/c.vim @ 344:7033303ea0c0 v7.0089
updated for version 7.0089
author | vimboss |
---|---|
date | Tue, 21 Jun 2005 22:37:39 +0000 |
parents | 8ecb0db93e9a |
children | 23f82b5d2814 |
comparison
equal
deleted
inserted
replaced
343:607cff4bc0cb | 344:7033303ea0c0 |
---|---|
1 " Vim syntax file | 1 " Vim syntax file |
2 " Language: C | 2 " Language: C |
3 " Maintainer: Bram Moolenaar <Bram@vim.org> | 3 " Maintainer: Bram Moolenaar <Bram@vim.org> |
4 " Last Change: 2005 Jan 26 | 4 " Last Change: 2005 Jun 20 |
5 | 5 |
6 " For version 5.x: Clear all syntax items | 6 " Quit when a (custom) 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 " A bunch of useful C keywords | 11 " A bunch of useful C keywords |
15 syn keyword cStatement goto break return continue asm | 12 syn keyword cStatement goto break return continue asm |
296 endif | 293 endif |
297 endif | 294 endif |
298 exec "syn sync ccomment cComment minlines=" . b:c_minlines | 295 exec "syn sync ccomment cComment minlines=" . b:c_minlines |
299 | 296 |
300 " Define the default highlighting. | 297 " Define the default highlighting. |
301 " For version 5.7 and earlier: only when not done already | 298 " Only used when an item doesn't have highlighting yet |
302 " For version 5.8 and later: only when an item doesn't have highlighting yet | 299 hi def link cFormat cSpecial |
303 if version >= 508 || !exists("did_c_syn_inits") | 300 hi def link cCppString cString |
304 if version < 508 | 301 hi def link cCommentL cComment |
305 let did_c_syn_inits = 1 | 302 hi def link cCommentStart cComment |
306 command -nargs=+ HiLink hi link <args> | 303 hi def link cLabel Label |
307 else | 304 hi def link cUserLabel Label |
308 command -nargs=+ HiLink hi def link <args> | 305 hi def link cConditional Conditional |
309 endif | 306 hi def link cRepeat Repeat |
310 | 307 hi def link cCharacter Character |
311 HiLink cFormat cSpecial | 308 hi def link cSpecialCharacter cSpecial |
312 HiLink cCppString cString | 309 hi def link cNumber Number |
313 HiLink cCommentL cComment | 310 hi def link cOctal Number |
314 HiLink cCommentStart cComment | 311 hi def link cOctalZero PreProc " link this to Error if you want |
315 HiLink cLabel Label | 312 hi def link cFloat Float |
316 HiLink cUserLabel Label | 313 hi def link cOctalError cError |
317 HiLink cConditional Conditional | 314 hi def link cParenError cError |
318 HiLink cRepeat Repeat | 315 hi def link cErrInParen cError |
319 HiLink cCharacter Character | 316 hi def link cErrInBracket cError |
320 HiLink cSpecialCharacter cSpecial | 317 hi def link cCommentError cError |
321 HiLink cNumber Number | 318 hi def link cCommentStartError cError |
322 HiLink cOctal Number | 319 hi def link cSpaceError cError |
323 HiLink cOctalZero PreProc " link this to Error if you want | 320 hi def link cSpecialError cError |
324 HiLink cFloat Float | 321 hi def link cOperator Operator |
325 HiLink cOctalError cError | 322 hi def link cStructure Structure |
326 HiLink cParenError cError | 323 hi def link cStorageClass StorageClass |
327 HiLink cErrInParen cError | 324 hi def link cInclude Include |
328 HiLink cErrInBracket cError | 325 hi def link cPreProc PreProc |
329 HiLink cCommentError cError | 326 hi def link cDefine Macro |
330 HiLink cCommentStartError cError | 327 hi def link cIncluded cString |
331 HiLink cSpaceError cError | 328 hi def link cError Error |
332 HiLink cSpecialError cError | 329 hi def link cStatement Statement |
333 HiLink cOperator Operator | 330 hi def link cPreCondit PreCondit |
334 HiLink cStructure Structure | 331 hi def link cType Type |
335 HiLink cStorageClass StorageClass | 332 hi def link cConstant Constant |
336 HiLink cInclude Include | 333 hi def link cCommentString cString |
337 HiLink cPreProc PreProc | 334 hi def link cComment2String cString |
338 HiLink cDefine Macro | 335 hi def link cCommentSkip cComment |
339 HiLink cIncluded cString | 336 hi def link cString String |
340 HiLink cError Error | 337 hi def link cComment Comment |
341 HiLink cStatement Statement | 338 hi def link cSpecial SpecialChar |
342 HiLink cPreCondit PreCondit | 339 hi def link cTodo Todo |
343 HiLink cType Type | 340 hi def link cCppSkip cCppOut |
344 HiLink cConstant Constant | 341 hi def link cCppOut2 cCppOut |
345 HiLink cCommentString cString | 342 hi def link cCppOut Comment |
346 HiLink cComment2String cString | |
347 HiLink cCommentSkip cComment | |
348 HiLink cString String | |
349 HiLink cComment Comment | |
350 HiLink cSpecial SpecialChar | |
351 HiLink cTodo Todo | |
352 HiLink cCppSkip cCppOut | |
353 HiLink cCppOut2 cCppOut | |
354 HiLink cCppOut Comment | |
355 | |
356 delcommand HiLink | |
357 endif | |
358 | 343 |
359 let b:current_syntax = "c" | 344 let b:current_syntax = "c" |
360 | 345 |
361 " vim: ts=8 | 346 " vim: ts=8 |