diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2014-07-11 04:05:51 +0000 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2014-07-29 02:12:31 +0000 |
commit | a98a6996c291b3e300d27b791eded9eed333d677 (patch) | |
tree | 51d92f6cac128f938cd0aaa9a8dd0ce7a83d63a9 /runtime/syntax/chordpro.vim | |
parent | 66bc13163398786c88e20b7cdd61c66978b4d3fb (diff) | |
download | rneovim-a98a6996c291b3e300d27b791eded9eed333d677.tar.gz rneovim-a98a6996c291b3e300d27b791eded9eed333d677.tar.bz2 rneovim-a98a6996c291b3e300d27b791eded9eed333d677.zip |
re-integrate runtime/ vim-patch:0 #938
Vim runtime files based on 7.4.384 / hg changeset 7090d7f160f7
Excluding:
Amiga icons (*.info, icons/)
doc/hangulin.txt
tutor/
spell/
lang/ (only used for menu translations)
macros/maze/, macros/hanoi/, macros/life/, macros/urm/
These were used to test vi compatibility.
termcap
"Demonstration of a termcap file (for the Amiga and Archimedes)"
Helped-by: Rich Wareham <rjw57@cam.ac.uk>
Helped-by: John <john.schmidt.h@gmail.com>
Helped-by: Yann <yann@yann-salaun.com>
Helped-by: Christophe Badoit <c.badoit@lesiteimmo.com>
Helped-by: drasill <github@tof2k.com>
Helped-by: Tae Sandoval Murgan <taecilla@gmail.com>
Helped-by: Lowe Thiderman <lowe.thiderman@gmail.com>
Diffstat (limited to 'runtime/syntax/chordpro.vim')
-rw-r--r-- | runtime/syntax/chordpro.vim | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/runtime/syntax/chordpro.vim b/runtime/syntax/chordpro.vim new file mode 100644 index 0000000000..5ccec26508 --- /dev/null +++ b/runtime/syntax/chordpro.vim @@ -0,0 +1,67 @@ +" Vim syntax file +" Language: ChordPro (v. 3.6.2) +" Maintainer: Niels Bo Andersen <niels@niboan.dk> +" Last Change: 2006 Apr 30 +" Remark: Requires VIM version 6.00 or greater + +" Quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +setlocal iskeyword+=- + +syn case ignore + +syn keyword chordproDirective contained + \ start_of_chorus soc end_of_chorus eoc new_song ns no_grid ng grid g + \ new_page np new_physical_page npp start_of_tab sot end_of_tab eot + \ column_break colb + +syn keyword chordproDirWithOpt contained + \ comment c comment_italic ci comment_box cb title t subtitle st define + \ textfont textsize chordfont chordsize columns col + +syn keyword chordproDefineKeyword contained base-fret frets + +syn match chordproDirMatch /{\w*}/ contains=chordproDirective contained transparent +syn match chordproDirOptMatch /{\w*:/ contains=chordproDirWithOpt contained transparent + +" Workaround for a bug in VIM 6, which causes incorrect coloring of the first { +if version < 700 + syn region chordproOptions start=/{\w*:/ end=/}/ contains=chordproDirOptMatch contained transparent + syn region chordproOptions start=/{define:/ end=/}/ contains=chordproDirOptMatch, chordproDefineKeyword contained transparent +else + syn region chordproOptions start=/{\w*:/hs=e+1 end=/}/he=s-1 contains=chordproDirOptMatch contained + syn region chordproOptions start=/{define:/hs=e+1 end=/}/he=s-1 contains=chordproDirOptMatch, chordproDefineKeyword contained +endif + +syn region chordproTag start=/{/ end=/}/ contains=chordproDirMatch,chordproOptions oneline + +syn region chordproChord matchgroup=chordproBracket start=/\[/ end=/]/ oneline + +syn region chordproTab start=/{start_of_tab}\|{sot}/hs=e+1 end=/{end_of_tab}\|{eot}/he=s-1 contains=chordproTag,chordproComment keepend + +syn region chordproChorus start=/{start_of_chorus}\|{soc}/hs=e+1 end=/{end_of_chorus}\|{eoc}/he=s-1 contains=chordproTag,chordproChord,chordproComment keepend + +syn match chordproComment /^#.*/ + +" Define the default highlighting. +hi def link chordproDirective Statement +hi def link chordproDirWithOpt Statement +hi def link chordproOptions Special +hi def link chordproChord Type +hi def link chordproTag Constant +hi def link chordproTab PreProc +hi def link chordproComment Comment +hi def link chordproBracket Constant +hi def link chordproDefineKeyword Type +hi def chordproChorus term=bold cterm=bold gui=bold + +let b:current_syntax = "chordpro" + +let &cpo = s:cpo_save +unlet s:cpo_save |