Commit: runtime(lyrics): support multiple timestamps in syntax script

3 views
Skip to first unread message

Christian Brabandt

unread,
Sep 20, 2024, 3:45:19 PM9/20/24
to vim...@googlegroups.com
runtime(lyrics): support multiple timestamps in syntax script

Commit: https://github.com/vim/vim/commit/597aadcf214cd13bf6a2155bf45173edc03199de
Author: ObserverOfTime <chrono...@disroot.org>
Date: Fri Sep 20 21:41:17 2024 +0200

runtime(lyrics): support multiple timestamps in syntax script

Problem: Multiple timestamps in the same line were not highlighted
Solution: Adapt the syntax to support multiple timestamps

fixes: #15703
closes: #15707

Signed-off-by: ObserverOfTime <chrono...@disroot.org>
Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/runtime/syntax/lyrics.vim b/runtime/syntax/lyrics.vim
index 42a288b51..fd127988f 100644
--- a/runtime/syntax/lyrics.vim
+++ b/runtime/syntax/lyrics.vim
@@ -2,7 +2,7 @@
" Language: LyRiCs
" Maintainer: ObserverOfTime <chrono...@disroot.org>
" Filenames: *.lrc
-" Last Change: 2022 Sep 18
+" Last Change: 2024 Sep 20

if exists('b:current_syntax')
finish
@@ -23,7 +23,7 @@ syn match lrcTagName contained nextgroup=lrcTagValue
syn match lrcTagValue /:\zs.\+\ze\]/ contained

" Lyrics
-syn match lrcLyricTime /^\s*\[\d\d:\d\d\.\d\d\]/
+syn match lrcLyricTime /^\s*\(\[\d\d:\d\d\.\d\d\]\)\+/
\ contains=lrcNumber nextgroup=lrcLyricLine
syn match lrcLyricLine /.*$/ contained contains=lrcWordTime,@Spell
syn match lrcWordTime /<\d\d:\d\d\.\d\d>/ contained contains=lrcNumber,@NoSpell
Reply all
Reply to author
Forward
0 new messages