-
Notifications
You must be signed in to change notification settings - Fork 0
/
bmb.vim
68 lines (55 loc) · 1.55 KB
/
bmb.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
" Author: Samuele Giraudo
" Creation: aug. 2022
" Modifications: aug. 2022, nov. 2023
" Syntax file of the Bud Music Box language.
" This file has to be at ~/.vim/syntax/bmb.vim
if exists("b:current_syntax")
finish
endif
" Turns off spell checking.
setlocal nospell
" To allow '-' to be part of a keyword.
setlocal iskeyword+=-
" Comments.
syn region Comment start="{" end="}" containedin=ALL
" Commands.
syn keyword Structure show
syn keyword Structure write
syn keyword Structure play
syn keyword Structure scale
syn keyword Structure root
syn keyword Structure tempo
syn keyword Structure sounds
syn keyword Structure monoid
syn keyword Structure multi-pattern
syn keyword Structure mirror
syn keyword Structure inverse
syn keyword Structure concatenate
syn keyword Structure concatenate-repeat
syn keyword Structure stack
syn keyword Structure stack-repeat
syn keyword Structure partial-compose
syn keyword Structure full-compose
syn keyword Structure homogeneous-compose
syn keyword Structure colorize
syn keyword Structure mono-colorize
syn keyword Structure generate
" Options of commands.
syn keyword String add
syn keyword String cyclic
syn keyword String mul
syn keyword String mul-mod
syn keyword String max
syn keyword String partial
syn keyword String full
syn keyword String homogeneous
" Stacking patterns.
syn match Conditional "+"
" Rests.
syn match Macro "."
" Match colors.
syn match Constant "%[a-zA-Z_']\+[a-zA-Z0-9_']*"
" Multi-pattern or colored multi-pattern names.
syn match Normal "[a-zA-Z_']\+[a-zA-Z0-9_']*"
" Numbers.
syn match Number "\d\+"