-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathirida.vim
54 lines (43 loc) · 1.43 KB
/
irida.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
" Irida syntax highlighting
" Put this file in .vim/syntax/irida.vim
" and add in your .vimrc file the next line:
" autocmd BufRead,BufNewFile *.iri set filetype=irida
if exists("b:current_syntax")
finish
endif
syntax keyword iriTodos TODO FIXME NOTE
syntax keyword iriBool true false
syntax keyword iriKeywords
\ do end
\ alloc
\ proc unsafe rec macro
\ break assert
\ printi printni prints printns
\ drop dupl ddrop
\ ret nothing
syntax keyword iriOperators
\ add sub mul div
\ eq gt ge lt le
syntax keyword iriTypes
\ int nat bool char list " nat = unsigned int
syntax keyword iriConditionals if then else
syntax keyword iriRepeats loop while
syntax keyword iriInclude include
syntax region iriCommentLine start="//" end="$" contains=iriTodos
syntax region iriStr start=/\v"/ skip=/\v\\./ end=/\v"/
syntax region iriChar start=/\v'/ skip=/\v\\./ end=/\v'/
syntax match iriInt "\v<\d+>"
" Set highlights
highlight default link iriTodos Todo
highlight default link iriKeywords Keyword
highlight default link iriOperators Operator
highlight default link iriConditionals Conditional
highlight default link iriRepeats Repeat
highlight default link iriInclude Include
highlight default link iriTypes Type
highlight default link iriBool Boolean
highlight default link iriCommentLine Comment
highlight default link iriStr String
highlight default link iriChar Character
highlight default link iriInt Number
let b:current_syntax = "irida"