-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmgabc.vim
executable file
·40 lines (36 loc) · 1.68 KB
/
mgabc.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
" Vim syntax file
" Language: Gabc gregorian chant notation
" Maintainer: Elie Roux <[email protected]>
" Last Change: 2008 Nov 29
" Quit when a (custom) syntax file was already loaded
"if exists("b:current_syntax")
" finish
"endif
syn match versenumber "[0-9]\+"
"syn match gabcAttributeName /^[^:]*:/
"syn match gabcAttributeNameb ";"
syn match gabcTextMarkup "</\?\w\+>" contained
"syn match gabcTranslation "\[[^\[\(]*\]\?" contained
"syn match gabcBasicNote "[a-mA-M]" contained
syn match gabcBasicNote "[a-zA-Z]" contained
"syn match gabcAlteration "[\<\>~xXyYvVoOwWqQ\-Ss\._'1234]" contained
"syn match gabcSpace "[`,;!: /zZ]" contained
syn match toneIndicator "\\[a-z0-9]\+" contained
syn region gabcNotes matchgroup=gabcNote start="(" end=")" contains=toneIndicator,gabcNotes, gabcBasicNote
syn region gabcNotes matchgroup=gabcTextMarkup start="<" end=">" contains=toneIndicator,gabcNotes, gabcBasicNote
"syn region text matchgroup=gabcNote start="<..\?>" end="<\/..\?>" contains=toneIndicator,gabcNotes, gabcBasicNote
"syn region gabcText start="%%" end="%%zz" contains=gabcNotes,gabcTextMarkup,gabcTranslation
syn region texHeading start="{" end="}" contains=gabcNotes,gabcTextMarkup,gabcTranslation
" Define the default highlighting.
"hi def link gabcAttributeName Comment
"hi def link gabcAttributeNameb Comment
"hi def link gabcText Comment
hi def link gabcTextMarkup SpecialKey
hi def link gabcBasicNote Statement
hi def link gabcNote Type
"hi def link gabcAlteration Type
"hi def link gabcSpace Special
hi def link toneIndicator PreProc
hi def link versenumber Type
hi def link texHeading SpecialKey
"let b:current_syntax = "gabc"