Created
October 13, 2012 10:25
-
-
Save ghprince/3884077 to your computer and use it in GitHub Desktop.
CCK syntax file for VIM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Vim syntax file | |
" Language: CCK | |
" Maintainer: Gordon Gao <[email protected]> | |
" Last Change: 2012 Oct 13 | |
" Please move it to ~/.vim/syntax/cck.vim | |
if version < 600 | |
syntax clear | |
elseif exists("b:current_syntax") | |
finish | |
endif | |
" Basic CCK commands: http://tie.us.oracle.com/resources/nexus/training/CCK/CCK.html | |
syn keyword cckTypeID contained test_suite test_set set_group test_case action accept pragma send event_group attr_group | |
syn match cckHeader "^type\s\+[a-z_]\+" contains=cckTypeID | |
syn match cckHeader "^\(name\|author\|version\)\>" | |
syn match cckType "^\(test_set\|set_group\|test_case\|action\|accept\|pragma\|send\|event_group\|attr_group\|attr\|no_op\|suffix\|prefix\|command\|argument\)\>" | |
" You may add your own selection of cck attributes you want to highlight | |
syn keyword cckAttr ON_RERUN RUN_ALWAYS IGNORE_IF SUSPEND_IF | |
syn match cckNumber "\<\d\+\>" | |
syn keyword cckBoolean TRUE FALSE YES NO true false yes no | |
syn match cckVariable "%{[^}]*}" | |
syn region cckString start=+"+ skip=+\\"+ end=+"+ contains=cckVariable | |
syn match cckLineCont "\\$" | |
syn keyword cckLogicOp and or not AND OR NOT | |
syn match cckLogicOp "==\|!=\|&&\|||" | |
syn keyword cckTodo contained TODO | |
syn region cckComment start="^\s*\#" skip="\\$" end="$" contains=cckTodo | |
" Define the default highlighting. | |
" For version 5.7 and earlier: only when not done already | |
" For version 5.8 and later: only when an item doesn't have highlighting yet | |
if version >= 508 || !exists("did_cck_syntax_inits") | |
if version < 508 | |
let did_cck_syntax_inits = 1 | |
command -nargs=+ HiLink hi link <args> | |
else | |
command -nargs=+ HiLink hi def link <args> | |
endif | |
HiLink cckTypeID Statement | |
HiLink cckHeader PreProc | |
HiLink cckType Statement | |
HiLink cckAttr Constant | |
HiLink cckNumber Number | |
HiLink cckBoolean Boolean | |
HiLink cckVariable Identifier | |
HiLink cckString String | |
HiLink cckLineCont Special | |
HiLink cckLogicOp Special | |
HiLink cckTodo Todo | |
HiLink cckComment Comment | |
delcommand HiLink | |
endif | |
let b:current_syntax = "cck" | |
" vim: ts=8 | |
let did_cck_syntax_inits = 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment