7
|
1 " Vim syntax file
|
|
2 " Language: CRM114
|
|
3 " Maintainer: Nikolai Weibull <source@pcppopper.org>
|
|
4 " URL: http://www.pcppopper.org/vim/syntax/pcp/crm/
|
|
5 " Latest Revision: 2004-05-22
|
|
6 " arch-tag: a3d3eaaf-4700-44ff-b332-f6c42c036883
|
|
7
|
|
8 if version < 600
|
|
9 syntax clear
|
|
10 elseif exists("b:current_syntax")
|
|
11 finish
|
|
12 endif
|
|
13
|
|
14 " Todo
|
|
15 syn keyword crmTodo contained TODO FIXME XXX NOTE
|
|
16
|
|
17 " Comments
|
|
18 syn region crmComment matchgroup=crmComment start='#' end='$' end='\\#' contains=crmTodo
|
|
19
|
|
20 " Variables
|
|
21 syn match crmVariable ':[*#@]:[^:]\{-1,}:'
|
|
22
|
|
23 " Special Characters
|
|
24 syn match crmSpecial '\\\%(x\x\x\|o\o\o\o\|[]nrtabvf0>)};/\\]\)'
|
|
25
|
|
26 " Statements
|
|
27 syn keyword crmStatement insert noop accept alius alter classify eval exit
|
|
28 syn keyword crmStatement fail fault goto hash intersect isolate input learn
|
|
29 syn keyword crmStatement liaf match output syscall trap union window
|
|
30
|
|
31 " Regexes
|
|
32 syn region crmRegex matchgroup=crmRegex start='/' skip='\\/' end='/' contains=crmVariable
|
|
33
|
|
34 " Labels
|
|
35 syn match crmLabel '^\s*:[[:graph:]]\+:'
|
|
36
|
|
37 " Define the default highlighting.
|
|
38 " For version 5.7 and earlier: only when not done already
|
|
39 " For version 5.8 and later: only when an item doesn't have highlighting yet
|
|
40 if version >= 508 || !exists("did_crm_syn_inits")
|
|
41 if version < 508
|
|
42 let did_crm_syn_inits = 1
|
|
43 command -nargs=+ HiLink hi link <args>
|
|
44 else
|
|
45 command -nargs=+ HiLink hi def link <args>
|
|
46 endif
|
|
47
|
|
48 HiLink crmTodo Todo
|
|
49 HiLink crmComment Comment
|
|
50 HiLink crmVariable Identifier
|
|
51 HiLink crmSpecial SpecialChar
|
|
52 HiLink crmStatement Statement
|
|
53 HiLink crmRegex String
|
|
54 HiLink crmLabel Label
|
|
55
|
|
56 delcommand HiLink
|
|
57 endif
|
|
58
|
|
59 let b:current_syntax = "crm"
|
|
60
|
|
61 " vim: set sts=2 sw=2:
|