annotate runtime/syntax/lyrics.vim @ 31527:aa2ec7a12146 v9.0.1096

patch 9.0.1096: reallocating hashtab when the size didn't change Commit: https://github.com/vim/vim/commit/71d53e7c579b8af44083142ea3894b455947ad81 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Dec 25 20:46:13 2022 +0000 patch 9.0.1096: reallocating hashtab when the size didn't change Problem: Reallocating hashtab when the size didn't change. Solution: Bail out when the hashtab is already the desired size.
author Bram Moolenaar <Bram@vim.org>
date Sun, 25 Dec 2022 22:00:04 +0100
parents 0827d3d6d8c0
children 7b4f0a2a87bf
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
30324
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
1 " Vim syntax file
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
2 " Language: LyRiCs
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
3 " Maintainer: ObserverOfTime <chronobserver@disroot.org>
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
4 " Filenames: *.lrc
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
5 " Last Change: 2022 Sep 18
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
6
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
7 if exists('b:current_syntax')
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
8 finish
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
9 endif
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
10
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
11 let s:cpo_save = &cpoptions
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
12 set cpoptions&vim
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
13
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
14 syn case ignore
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
15
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
16 " Errors
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
17 syn match lrcError /^.\+$/
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
18
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
19 " ID tags
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
20 syn match lrcTag /^\s*\[\a\+:.\+\]\s*$/ contains=lrcTagName,lrcTagValue
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
21 syn match lrcTagName contained nextgroup=lrcTagValue
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
22 \ /\[\zs\(al\|ar\|au\|by\|encoding\|la\|id\|length\|offset\|re\|ti\|ve\)\ze:/
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
23 syn match lrcTagValue /:\zs.\+\ze\]/ contained
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
24
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
25 " Lyrics
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
26 syn match lrcLyricTime /^\s*\[\d\d:\d\d\.\d\d\]/
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
27 \ contains=lrcNumber nextgroup=lrcLyricLine
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
28 syn match lrcLyricLine /.*$/ contained contains=lrcWordTime,@Spell
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
29 syn match lrcWordTime /<\d\d:\d\d\.\d\d>/ contained contains=lrcNumber,@NoSpell
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
30 syn match lrcNumber /[+-]\=\d\+/ contained
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
31
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
32 hi def link lrcLyricTime Label
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
33 hi def link lrcNumber Number
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
34 hi def link lrcTag PreProc
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
35 hi def link lrcTagName Identifier
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
36 hi def link lrcTagValue String
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
37 hi def link lrcWordTime Special
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
38 hi def link lrcError Error
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
39
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
40 let b:current_syntax = 'lyrics'
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
41
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
42 let &cpoptions = s:cpo_save
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
43 unlet s:cpo_save