annotate runtime/syntax/chordpro.vim @ 14337:48287f1fc8a1 v8.1.0184

patch 8.1.0184: not easy to figure out the window layout commit https://github.com/vim/vim/commit/b6959a8e06cef6d2126b030b2f8acd49457a3582 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jul 14 21:41:44 2018 +0200 patch 8.1.0184: not easy to figure out the window layout Problem: Not easy to figure out the window layout. Solution: Add "wincol" and "winrow" to what getwininfo() returns.
author Christian Brabandt <cb@256bit.org>
date Sat, 14 Jul 2018 21:45:05 +0200
parents 8cd729851562
children 4d76b3e07c07
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
839
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
1 " Vim syntax file
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
2 " Language: ChordPro (v. 3.6.2)
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
3 " Maintainer: Niels Bo Andersen <niels@niboan.dk>
856
8cd729851562 updated for version 7.0g
vimboss
parents: 839
diff changeset
4 " Last Change: 2006 Apr 30
839
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
5 " Remark: Requires VIM version 6.00 or greater
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
6
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
7 " Quit when a syntax file was already loaded
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
8 if exists("b:current_syntax")
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
9 finish
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
10 endif
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
11
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
12 let s:cpo_save = &cpo
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
13 set cpo&vim
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
14
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
15 setlocal iskeyword+=-
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
16
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
17 syn case ignore
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
18
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
19 syn keyword chordproDirective contained
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
20 \ start_of_chorus soc end_of_chorus eoc new_song ns no_grid ng grid g
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
21 \ new_page np new_physical_page npp start_of_tab sot end_of_tab eot
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
22 \ column_break colb
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
23
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
24 syn keyword chordproDirWithOpt contained
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
25 \ comment c comment_italic ci comment_box cb title t subtitle st define
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
26 \ textfont textsize chordfont chordsize columns col
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
27
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
28 syn keyword chordproDefineKeyword contained base-fret frets
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
29
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
30 syn match chordproDirMatch /{\w*}/ contains=chordproDirective contained transparent
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
31 syn match chordproDirOptMatch /{\w*:/ contains=chordproDirWithOpt contained transparent
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
32
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
33 " Workaround for a bug in VIM 6, which causes incorrect coloring of the first {
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
34 if version < 700
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
35 syn region chordproOptions start=/{\w*:/ end=/}/ contains=chordproDirOptMatch contained transparent
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
36 syn region chordproOptions start=/{define:/ end=/}/ contains=chordproDirOptMatch, chordproDefineKeyword contained transparent
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
37 else
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
38 syn region chordproOptions start=/{\w*:/hs=e+1 end=/}/he=s-1 contains=chordproDirOptMatch contained
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
39 syn region chordproOptions start=/{define:/hs=e+1 end=/}/he=s-1 contains=chordproDirOptMatch, chordproDefineKeyword contained
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
40 endif
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
41
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
42 syn region chordproTag start=/{/ end=/}/ contains=chordproDirMatch,chordproOptions oneline
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
43
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
44 syn region chordproChord matchgroup=chordproBracket start=/\[/ end=/]/ oneline
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
45
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
46 syn region chordproTab start=/{start_of_tab}\|{sot}/hs=e+1 end=/{end_of_tab}\|{eot}/he=s-1 contains=chordproTag,chordproComment keepend
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
47
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
48 syn region chordproChorus start=/{start_of_chorus}\|{soc}/hs=e+1 end=/{end_of_chorus}\|{eoc}/he=s-1 contains=chordproTag,chordproChord,chordproComment keepend
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
49
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
50 syn match chordproComment /^#.*/
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
51
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
52 " Define the default highlighting.
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
53 hi def link chordproDirective Statement
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
54 hi def link chordproDirWithOpt Statement
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
55 hi def link chordproOptions Special
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
56 hi def link chordproChord Type
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
57 hi def link chordproTag Constant
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
58 hi def link chordproTab PreProc
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
59 hi def link chordproComment Comment
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
60 hi def link chordproBracket Constant
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
61 hi def link chordproDefineKeyword Type
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
62 hi def chordproChorus term=bold cterm=bold gui=bold
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
63
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
64 let b:current_syntax = "chordpro"
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
65
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
66 let &cpo = s:cpo_save
1f3b1021f002 updated for version 7.0e05
vimboss
parents:
diff changeset
67 unlet s:cpo_save