From 898639c4ea7e1bddeb6433f5e5709a8ae43d842c Mon Sep 17 00:00:00 2001 From: Alexander Gehrke Date: Fri, 15 Mar 2024 15:19:04 +0100 Subject: [PATCH] Add minimal WebVTT syntax file --- syntax/vtt.vim | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 syntax/vtt.vim diff --git a/syntax/vtt.vim b/syntax/vtt.vim new file mode 100644 index 0000000..0ad221d --- /dev/null +++ b/syntax/vtt.vim @@ -0,0 +1,25 @@ +" Vim syntax file +" Language: Web Video Text Tracks Format (VTT) +" Filenames: *.vtt +" Vim syntax file +" SeeAlso: +" Maintainer: Alexander Gehrke +" Created: 2023-12-19 + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn region vttComment start="^NOTE .*" end="^$" +syn match vttTimings "\d\{2}:\d\{2}\.\d\{3}" +syn match vttArrow "-->" +syn keyword vttHeader WEBVTT + +hi def link vttTimings Number +hi def link vttArrow Special +hi def link vttComment Comment +hi def link vttHeader Keyword + +let b:current_syntax = "vtt"