neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

abc.vim (1842B)


      1 " Vim syntax file
      2 " Language:	abc music notation language
      3 " Maintainer:	James Allwright <J.R.Allwright@westminster.ac.uk>
      4 " URL:		http://perun.hscs.wmin.ac.uk/~jra/vim/syntax/abc.vim
      5 " Last Change:	27th April 2001
      6 
      7 " quit when a syntax file was already loaded
      8 if exists("b:current_syntax")
      9  finish
     10 endif
     11 
     12 " tags
     13 syn region abcGuitarChord start=+"[A-G]+ end=+"+ contained
     14 syn match abcNote "z[1-9]*[0-9]*" contained
     15 syn match abcNote "z[1-9]*[0-9]*/[248]\=" contained
     16 syn match abcNote "[=_\^]\{,2}[A-G],*[1-9]*[0-9]*" contained
     17 syn match abcNote "[=_\^]\{,2}[A-G],*[1-9]*[0-9]*/[248]\=" contained
     18 syn match abcNote "[=_\^]\{,2}[a-g]'*[1-9]*[0-9]*"  contained
     19 syn match abcNote "[=_\^]\{,2}[a-g]'*[1-9]*[0-9]*/[248]\="  contained
     20 syn match abcBar "|"  contained
     21 syn match abcBar "[:|][:|]"  contained
     22 syn match abcBar ":|2"  contained
     23 syn match abcBar "|1"  contained
     24 syn match abcBar "\[[12]"  contained
     25 syn match abcTuple "([1-9]\+:\=[0-9]*:\=[0-9]*" contained
     26 syn match abcBroken "<\|<<\|<<<\|>\|>>\|>>>" contained
     27 syn match abcTie    "-"
     28 syn match abcHeadField "^[A-EGHIK-TVWXZ]:.*$" contained
     29 syn match abcBodyField "^[KLMPQWVw]:.*$" contained
     30 syn region abcHeader start="^X:" end="^K:.*$" contained contains=abcHeadField,abcComment keepend
     31 syn region abcTune start="^X:" end="^ *$" contains=abcHeader,abcComment,abcBar,abcNote,abcBodyField,abcGuitarChord,abcTuple,abcBroken,abcTie
     32 syn match abcComment "%.*$"
     33 
     34 
     35 " Define the default highlighting.
     36 " Only when an item doesn't have highlighting yet
     37 
     38 hi def link abcComment		Comment
     39 hi def link abcHeadField		Type
     40 hi def link abcBodyField		Special
     41 hi def link abcBar			Statement
     42 hi def link abcTuple			Statement
     43 hi def link abcBroken			Statement
     44 hi def link abcTie			Statement
     45 hi def link abcGuitarChord	Identifier
     46 hi def link abcNote			Constant
     47 
     48 
     49 let b:current_syntax = "abc"
     50 
     51 " vim: ts=4