-" Vim syntax file
+" LilyPond syntax file
" Language: LilyPond
" Maintainer: Heikki Junes <hjunes@cc.hut.fi>
" Created: Oct 17, 2002
" Last Change: Sep 23, 2003
" Version: 6.1-1
-" Latest:
-" http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lilypond.vim
-
+"
+" Installed As: vim/syntax/lilypond.vim
+" Uses Generated File: vim/syntax/lilypond-words.vim
+"
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
" Read the LilyPond syntax match groups:
" lilyKeyword, lilyReservedWord, lilyNote
if version < 600
- so <sfile>:p:h/lilypond.words.vim
+ so <sfile>:p:h/lilypond-words.vim
else
- runtime! syntax/lilypond.words.vim
+ runtime! syntax/lilypond-words.vim
if exists("b:current_syntax")
unlet b:current_syntax
endif
" 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
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
"
HiLink lilyComment Comment
HiLink lilyNote Identifier
+ HiLink lilyArticulation PreProc
HiLink lilyKeyword Keyword
HiLink lilyReservedWord Type