-
Notifications
You must be signed in to change notification settings - Fork 7
/
wake.vim
75 lines (66 loc) · 2.45 KB
/
wake.vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
" TO INSTALL:
" 1. add this line to ~/.vimrc
" au BufRead,BufNewFile *.wk set filetype=wake
" 2. move this file to ~/.vim/syntax/wake.vim
" Vim syntax file
" Language: Wake
" Maintainer: Michael Fairhurst
" Last Change: September 12, 2013
" Version: 1
" Copied from the cfengine, ruby, and perl syntax files
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
setlocal iskeyword+=:
syn keyword basickeyword with public new return if else while foreach in import provides needs then nothing var exists true false foreach in from try catch throw
syn region classdecl start="every" end="is:" contains=inheritancekeyword,interfacekeyword,ancestrysymbols,withinregionkeyword transparent keepend
syn match fulltextident "\~\[[^\]]\+\]\~"
syn match hashcomment "#\<[a-zA-Z]\+\>\?"
syn region blockcomment start="#>" end="##"
syn match blockcomment "##"
syn keyword inheritancekeyword a an contained
syn keyword interfacekeyword capable
syn keyword mytype Num Bool Text Char Exception
syn match alias "\<[a-z][a-zA-Z0-9]*\>"
syn match withinregionkeyword "\(every\|is:\)"
syn match shadow "\$"
syn match returntype "\(\<[a-zA-Z][a-zA-Z0-9]*\>\s\+\)\?--"
syn match functioncall "\<[a-zA-Z][a-zA-Z0-0]+\>(" contained
syn match methodstart "\<[a-zA-Z][a-zA-Z0-9]*\>("
syn match methodseg "\<)[a-zA-Z][a-zA-Z0-9]*\>("
syn match symbols "\((\|)\|;\||\|=\|+\|{\|}\|,\|\.\|<\|>\|\-\|\*\|\/\|:\)"
syn match ancestrysymbols "\((\|)\|,\)" contained
syn match typesymbols "\(\[\|\]\)"
syn match currysymbols "???"
syn region mystring start=/"/ skip=/\\\\\|\\"/ end=/"/
syn region mystring2 start=/'/ skip=/\\\\\|\\'/ end=/'/
syn match specialty ":[a-zA-Z0-9]\+"
syn region comment start="\/\/" end="$"
syn match comment "`[^`]*`"
hi link comment Comment
hi link hashcomment Comment
hi link blockcomment Comment
hi link basickeyword Keyword
hi link withinregionkeyword Keyword
hi link inheritancekeyword Type
hi link interfacekeyword Function
hi link mytype Type
hi link returntype String
hi link fulltextident Special
hi link alias Function
hi link shadow Function
hi link symbols Special
hi link ancestrysymbols Keyword
hi link currysymbols Function
hi link typesymbols Type
hi link methodseg Special
hi link methodstart Special
hi link functioncall String
hi link mystring2 String
hi link mystring String
hi link specialty Special
let b:current_syntax = "wake"