summaryrefslogtreecommitdiff
path: root/vim
diff options
context:
space:
mode:
authorGraham Percival <graham@percival-music.ca>2008-05-20 00:41:24 -0700
committerGraham Percival <graham@percival-music.ca>2008-05-20 00:41:24 -0700
commitd999e7caa682268c3d1893895a97e3b231b3474b (patch)
tree1a048eed4c09bc0374574465afc26e900efb3ebf /vim
parent3e7561400c3a953144bb7949d4fc22e42e87dd89 (diff)
Add articulation to vim syntax highlighting.
Diffstat (limited to 'vim')
-rw-r--r--vim/lilypond-syntax.vim6
1 files changed, 5 insertions, 1 deletions
diff --git a/vim/lilypond-syntax.vim b/vim/lilypond-syntax.vim
index 9808176736..7d0a6d89e7 100644
--- a/vim/lilypond-syntax.vim
+++ b/vim/lilypond-syntax.vim
@@ -33,7 +33,7 @@ setlocal mps+=<:>
" Case matters
syn case match
-syn cluster lilyMatchGroup contains=lilyMatcher,lilyString,lilyComment,lilyStatement,lilyNumber,lilyEquation,lilySlur,lilySpecial,lilyNote,lilyKeyword,lilyReservedWord
+syn cluster lilyMatchGroup contains=lilyMatcher,lilyString,lilyComment,lilyStatement,lilyNumber,lilyEquation,lilySlur,lilySpecial,lilyNote,lilyKeyword,lilyArticulation,lilyReservedWord
syn region lilyMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[<>]" end="}" contains=@lilyMatchGroup fold
syn region lilyMatcher matchgroup=Delimiter start="\[" end="]" contains=@lilyMatchGroup fold
@@ -48,6 +48,9 @@ syn match lilyEquation "\(#['`]\)\?\(\a*[-]\)*\a*\s*=\s*\(#[#'`]\?\)\?\a*"
syn match lilySlur "[(~)]"
syn match lilySlur "\\[()]"
syn match lilySpecial "\\[<!>\\]"
+" avoid highlighting the extra character in situations like
+" c--\mf c^^\mf c__\mf
+syn match lilyArticulation "[-_^][-_^+|>.]"
" Rest of syntax highlighting rules start here
"
@@ -68,6 +71,7 @@ if version >= 508 || !exists("did_lily_syn_inits")
HiLink lilyComment Comment
HiLink lilyNote Identifier
+ HiLink lilyArticulation PreProc
HiLink lilyKeyword Keyword
HiLink lilyReservedWord Type