]> git.donarmstrong.com Git - lilypond.git/blobdiff - vim/lilypond-syntax.vim
Merge branch 'lilypond/translation' of ssh://git.sv.gnu.org/srv/git/lilypond into...
[lilypond.git] / vim / lilypond-syntax.vim
index 9808176736db77217b746b1741c7fd397208a5cc..c749fd9aa09f8a3afdd17bce141c84362c867761 100644 (file)
@@ -2,7 +2,7 @@
 " Language:    LilyPond
 " Maintainer:  Heikki Junes <hjunes@cc.hut.fi>
 " Created:      Oct 17, 2002
-" Last Change: Sep 23, 2003
+" Last Change: Aug 30, 2009
 " Version:     6.1-1
 "
 " Installed As:        vim/syntax/lilypond.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
 
@@ -77,3 +81,5 @@ if version >= 508 || !exists("did_lily_syn_inits")
 
   delcommand HiLink
 endif
+
+let b:current_syntax = "lilypond"