Mercurial > vim
comparison runtime/syntax/groovy.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 | bc38030aec7d |
children | 46763b01cd9a |
comparison
equal
deleted
inserted
replaced
10047:a62862410ca1 | 10048:43efa4f5a8ea |
---|---|
42 " 4) open/write a .groovy file or a groovy script :-) | 42 " 4) open/write a .groovy file or a groovy script :-) |
43 " | 43 " |
44 " Let me know if you like it or send me patches, so that I can improve it | 44 " Let me know if you like it or send me patches, so that I can improve it |
45 " when I have time | 45 " when I have time |
46 | 46 |
47 " Quit when a syntax file was already loaded | 47 " quit when a syntax file was already loaded |
48 if !exists("main_syntax") | 48 if !exists("main_syntax") |
49 if version < 600 | 49 if exists("b:current_syntax") |
50 syntax clear | |
51 elseif exists("b:current_syntax") | |
52 finish | 50 finish |
53 endif | 51 endif |
54 " we define it here so that included files can test for it | 52 " we define it here so that included files can test for it |
55 let main_syntax='groovy' | 53 let main_syntax='groovy' |
56 endif | 54 endif |
57 | 55 |
58 let s:cpo_save = &cpo | 56 let s:cpo_save = &cpo |
59 set cpo&vim | 57 set cpo&vim |
60 | 58 |
61 " don't use standard HiLink, it will not work with included syntax files | 59 " don't use standard HiLink, it will not work with included syntax files |
62 if version < 508 | 60 command! -nargs=+ GroovyHiLink hi def link <args> |
63 command! -nargs=+ GroovyHiLink hi link <args> | |
64 else | |
65 command! -nargs=+ GroovyHiLink hi def link <args> | |
66 endif | |
67 | 61 |
68 " ########################## | 62 " ########################## |
69 " Java stuff taken from java.vim | 63 " Java stuff taken from java.vim |
70 " some characters that cannot be in a groovy program (outside a string) | 64 " some characters that cannot be in a groovy program (outside a string) |
71 " syn match groovyError "[\\@`]" | 65 " syn match groovyError "[\\@`]" |
327 syn match groovyDebug "[A-Za-z][a-zA-Z0-9_]*\.printStackTrace\s*("me=e-1 contains=groovyDebug.* nextgroup=groovyDebugParen | 321 syn match groovyDebug "[A-Za-z][a-zA-Z0-9_]*\.printStackTrace\s*("me=e-1 contains=groovyDebug.* nextgroup=groovyDebugParen |
328 syn match groovyDebug "\<trace[SL]\=\s*("me=e-1 contains=groovyDebug.* nextgroup=groovyDebugParen | 322 syn match groovyDebug "\<trace[SL]\=\s*("me=e-1 contains=groovyDebug.* nextgroup=groovyDebugParen |
329 | 323 |
330 syn cluster groovyTop add=groovyDebug | 324 syn cluster groovyTop add=groovyDebug |
331 | 325 |
332 if version >= 508 || !exists("did_c_syn_inits") | 326 GroovyHiLink groovyDebug Debug |
333 GroovyHiLink groovyDebug Debug | 327 GroovyHiLink groovyDebugString DebugString |
334 GroovyHiLink groovyDebugString DebugString | 328 GroovyHiLink groovyDebugStringError groovyError |
335 GroovyHiLink groovyDebugStringError groovyError | 329 GroovyHiLink groovyDebugType DebugType |
336 GroovyHiLink groovyDebugType DebugType | 330 GroovyHiLink groovyDebugBoolean DebugBoolean |
337 GroovyHiLink groovyDebugBoolean DebugBoolean | 331 GroovyHiLink groovyDebugNumber Debug |
338 GroovyHiLink groovyDebugNumber Debug | 332 GroovyHiLink groovyDebugSpecial DebugSpecial |
339 GroovyHiLink groovyDebugSpecial DebugSpecial | 333 GroovyHiLink groovyDebugSpecialCharacter DebugSpecial |
340 GroovyHiLink groovyDebugSpecialCharacter DebugSpecial | 334 GroovyHiLink groovyDebugCharacter DebugString |
341 GroovyHiLink groovyDebugCharacter DebugString | 335 GroovyHiLink groovyDebugParen Debug |
342 GroovyHiLink groovyDebugParen Debug | 336 |
343 | 337 GroovyHiLink DebugString String |
344 GroovyHiLink DebugString String | 338 GroovyHiLink DebugSpecial Special |
345 GroovyHiLink DebugSpecial Special | 339 GroovyHiLink DebugBoolean Boolean |
346 GroovyHiLink DebugBoolean Boolean | 340 GroovyHiLink DebugType Type |
347 GroovyHiLink DebugType Type | |
348 endif | |
349 endif | 341 endif |
350 | 342 |
351 " Match all Exception classes | 343 " Match all Exception classes |
352 syn match groovyExceptions "\<Exception\>\|\<[A-Z]\{1,}[a-zA-Z0-9]*Exception\>" | 344 syn match groovyExceptions "\<Exception\>\|\<[A-Z]\{1,}[a-zA-Z0-9]*Exception\>" |
353 | 345 |
396 syn region groovyParenT2 transparent matchgroup=groovyParen2 start="\[" end="\]" contains=@groovyTop,groovyParenT contained | 388 syn region groovyParenT2 transparent matchgroup=groovyParen2 start="\[" end="\]" contains=@groovyTop,groovyParenT contained |
397 syn match groovyParenError "\]" | 389 syn match groovyParenError "\]" |
398 | 390 |
399 " ############################### | 391 " ############################### |
400 " java.vim default highlighting | 392 " java.vim default highlighting |
401 if version >= 508 || !exists("did_groovy_syn_inits") | 393 GroovyHiLink groovyFuncDef Function |
402 if version < 508 | 394 GroovyHiLink groovyBraces Function |
403 let did_groovy_syn_inits = 1 | 395 GroovyHiLink groovyBranch Conditional |
404 endif | 396 GroovyHiLink groovyUserLabelRef groovyUserLabel |
405 GroovyHiLink groovyFuncDef Function | 397 GroovyHiLink groovyLabel Label |
406 GroovyHiLink groovyBraces Function | 398 GroovyHiLink groovyUserLabel Label |
407 GroovyHiLink groovyBranch Conditional | 399 GroovyHiLink groovyConditional Conditional |
408 GroovyHiLink groovyUserLabelRef groovyUserLabel | 400 GroovyHiLink groovyRepeat Repeat |
409 GroovyHiLink groovyLabel Label | 401 GroovyHiLink groovyExceptions Exception |
410 GroovyHiLink groovyUserLabel Label | 402 GroovyHiLink groovyAssert Statement |
411 GroovyHiLink groovyConditional Conditional | 403 GroovyHiLink groovyStorageClass StorageClass |
412 GroovyHiLink groovyRepeat Repeat | 404 GroovyHiLink groovyMethodDecl groovyStorageClass |
413 GroovyHiLink groovyExceptions Exception | 405 GroovyHiLink groovyClassDecl groovyStorageClass |
414 GroovyHiLink groovyAssert Statement | 406 GroovyHiLink groovyScopeDecl groovyStorageClass |
415 GroovyHiLink groovyStorageClass StorageClass | 407 GroovyHiLink groovyBoolean Boolean |
416 GroovyHiLink groovyMethodDecl groovyStorageClass | 408 GroovyHiLink groovySpecial Special |
417 GroovyHiLink groovyClassDecl groovyStorageClass | 409 GroovyHiLink groovySpecialError Error |
418 GroovyHiLink groovyScopeDecl groovyStorageClass | 410 GroovyHiLink groovySpecialCharError Error |
419 GroovyHiLink groovyBoolean Boolean | 411 GroovyHiLink groovyString String |
420 GroovyHiLink groovySpecial Special | 412 GroovyHiLink groovyRegexChar String |
421 GroovyHiLink groovySpecialError Error | 413 GroovyHiLink groovyCharacter Character |
422 GroovyHiLink groovySpecialCharError Error | 414 GroovyHiLink groovySpecialChar SpecialChar |
423 GroovyHiLink groovyString String | 415 GroovyHiLink groovyNumber Number |
424 GroovyHiLink groovyRegexChar String | 416 GroovyHiLink groovyError Error |
425 GroovyHiLink groovyCharacter Character | 417 GroovyHiLink groovyStringError Error |
426 GroovyHiLink groovySpecialChar SpecialChar | 418 GroovyHiLink groovyStatement Statement |
427 GroovyHiLink groovyNumber Number | 419 GroovyHiLink groovyOperator Operator |
428 GroovyHiLink groovyError Error | 420 GroovyHiLink groovyComment Comment |
429 GroovyHiLink groovyStringError Error | 421 GroovyHiLink groovyDocComment Comment |
430 GroovyHiLink groovyStatement Statement | 422 GroovyHiLink groovyLineComment Comment |
431 GroovyHiLink groovyOperator Operator | 423 GroovyHiLink groovyConstant Constant |
432 GroovyHiLink groovyComment Comment | 424 GroovyHiLink groovyTypedef Typedef |
433 GroovyHiLink groovyDocComment Comment | 425 GroovyHiLink groovyTodo Todo |
434 GroovyHiLink groovyLineComment Comment | 426 |
435 GroovyHiLink groovyConstant Constant | 427 GroovyHiLink groovyCommentTitle SpecialComment |
436 GroovyHiLink groovyTypedef Typedef | 428 GroovyHiLink groovyDocTags Special |
437 GroovyHiLink groovyTodo Todo | 429 GroovyHiLink groovyDocParam Function |
438 | 430 GroovyHiLink groovyCommentStar groovyComment |
439 GroovyHiLink groovyCommentTitle SpecialComment | 431 |
440 GroovyHiLink groovyDocTags Special | 432 GroovyHiLink groovyType Type |
441 GroovyHiLink groovyDocParam Function | 433 GroovyHiLink groovyExternal Include |
442 GroovyHiLink groovyCommentStar groovyComment | 434 |
443 | 435 GroovyHiLink htmlComment Special |
444 GroovyHiLink groovyType Type | 436 GroovyHiLink htmlCommentPart Special |
445 GroovyHiLink groovyExternal Include | 437 GroovyHiLink groovySpaceError Error |
446 | 438 GroovyHiLink groovyJDKBuiltin Special |
447 GroovyHiLink htmlComment Special | 439 GroovyHiLink groovyJDKOperOverl Operator |
448 GroovyHiLink htmlCommentPart Special | 440 GroovyHiLink groovyJDKMethods Function |
449 GroovyHiLink groovySpaceError Error | |
450 GroovyHiLink groovyJDKBuiltin Special | |
451 GroovyHiLink groovyJDKOperOverl Operator | |
452 GroovyHiLink groovyJDKMethods Function | |
453 endif | |
454 | 441 |
455 delcommand GroovyHiLink | 442 delcommand GroovyHiLink |
456 | 443 |
457 | 444 |
458 let b:current_syntax = "groovy" | 445 let b:current_syntax = "groovy" |