]> git.donarmstrong.com Git - lilypond.git/blobdiff - vim/lilypond-syntax.vim
Merge branch 'master' of carldsorensen@git.sv.gnu.org:/srv/git/lilypond
[lilypond.git] / vim / lilypond-syntax.vim
index a69f30c9618a03f9d647f99d4774466f33c5a51c..7d0a6d89e797ddf3b26f36034c18dcd2d9f4fdf2 100644 (file)
@@ -1,12 +1,13 @@
-" 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
@@ -18,9 +19,9 @@ endif
 " 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
@@ -32,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
@@ -47,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
 "
@@ -67,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