-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathfluffy.vim
75 lines (62 loc) · 2.73 KB
/
fluffy.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
" Vim syntax file
" Language: fluffy
"
" 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
syn keyword fluffyType byte short int long float double void
syn keyword fluffyType unsigned signed bool
syn keyword fluffyStatement goto return continue break step
syn keyword fluffyStatement instance
syn keyword fluffyStatement export enum class
syn keyword fluffyAttribute extern
syn keyword fluffyRepeat for while loop
syn keyword fluffyConditional if else
syn keyword fluffyStatement module import
syn keyword fluffyConstant null true false
syn keyword fluffyStatement struct nextgroup=fluffyIdentifier
syn keyword fluffyStatement union nextgroup=fluffyIdentifier
syn keyword fluffyStatement func nextgroup=fluffyIdentifier
syn keyword fluffyStatement var nextgroup=fluffyIdentifier
syn keyword fluffyStatement const nextgroup=fluffyIdentifier
syn keyword fluffyStatement concept nextgroup=fluffyIdentifier
syn keyword fluffyStatement typealias nextgroup=fluffyIdentifier
syn match fluffyIdentifier "[a-zA-Z_][a-zA-Z0-9_]*" contained
syn keyword fluffyOperator cast sizeof
syn match fluffyComment +//.*$+ contains=fluffyTodo,fluffyComment
syn region fluffyComment start=+/\*+ end=+\*/+ contains=fluffyTodo
syn keyword fluffyTodo TODO FIXME XXX contained
" strings
syn region fluffyString start=+"+ end=+"+ skip=+\\\\\|\\"+ contains=fluffyEscape
syn region fluffyCharacter start=+'+ end=+'+ skip=+\\\\\|\\'+ contains=fluffyEscape
syn match fluffyEscape +\\[abfnrtv'"\\]+ contained
syn match fluffyEscape "\\\o\{1,3}" contained
syn match fluffyEscape "\\x\x\{2}" contained
syn match fluffyNumber "\<0x\x\+[Ll]\=\>"
syn match fluffyNumber "\<\d\+[LljJ]\=\>"
syn match fluffyNumber "\.\d\+\([eE][+-]\=\d\+\)\=[jJ]\=\>"
syn match fluffyNumber "\<\d\+\.\([eE][+-]\=\d\+\)\=[jJ]\=\>"
syn match fluffyNumber "\<\d\+\.\d\+\([eE][+-]\=\d\+\)\=[jJ]\=\>"
syn sync match fluffySync grouphere NONE "):$"
syn sync maxlines=200
"syn sync minlines=2000
hi def link fluffyStatement Statement
hi def link fluffyConditional Conditional
hi def link fluffyConstant Constant
hi def link fluffyString String
hi def link fluffyCharacter Character
hi def link fluffyOperator Operator
hi def link fluffyEscape Special
hi def link fluffyComment Comment
hi def link fluffyTodo Todo
hi def link fluffyNumber Number
hi def link fluffyRepeat Repeat
hi def link fluffyCondition Conditional
hi def link fluffyType Type
hi def link fluffyAttribute StorageClass
hi def link fluffyIdentifier Identifier
let b:current_syntax = "fluffy"