-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathflor.vim
42 lines (31 loc) · 1.04 KB
/
flor.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
" MIT licensed
" in the vimrc file itself:
"au BufRead *.flo set filetype=flor
"au BufRead *.flor set filetype=flor
"au BufRead *.flon set filetype=flor
"au BufRead *.fln set filetype=flor
" Quit when a (custom) syntax file is already loaded
if exists("b:current_syntax")
finish
endif
syn match florSpecial ";"
syn match florSpecial "|"
syn match florSpecial "\\"
syn match florSpecial "\v\s_"
"syn match florOn /\v^\s*on\s(cancel|error|receive)\b/
"syn match florOn "on receive"
syn match florHead /^[ ]*[^ ;#\[\]{}()]\+/
syn match florHead /;\@<=[ ]*[^ ;#\[\]{}()]\+/
syn match florKey /\v\zs[^' ]+\ze[ ]*:/
syn keyword florKey if unless
syn region florString start=+"+ skip=+\\"+ end=+"+
syn region florString start=+'+ skip=+\\'+ end=+'+
syn region florString start=+/+ skip=+\\/+ end=+/+
syn region florComment start="#" end="\n"
hi def link florHead Keyword
hi def link florString String
hi def link florComment Comment
hi def link florSpecial Special
hi def link florKey Keyword
"hi def link florOn Keyword
let b:current_syntax = "flor"