annotate runtime/syntax/srt.vim @ 30324:0827d3d6d8c0

Update runtime files Commit: https://github.com/vim/vim/commit/9712ff1288f942736ed76c0dec014909f067eec9 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Sep 18 13:04:22 2022 +0100 Update runtime files
author Bram Moolenaar <Bram@vim.org>
date Sun, 18 Sep 2022 14:15:05 +0200
parents
children
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: SubRip
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: *.srt
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
5 " Last Change: 2022 Sep 12
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 syn spell toplevel
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
12
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
13 syn cluster srtSpecial contains=srtBold,srtItalics,srtStrikethrough,srtUnderline,srtFont,srtTag,srtEscape
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
14
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
15 " Number
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
16 syn match srtNumber /^\d\+$/ contains=@NoSpell
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
17
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
18 " Range
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
19 syn match srtRange /\d\d:\d\d:\d\d[,.]\d\d\d --> \d\d:\d\d:\d\d[,.]\d\d\d/ skipwhite contains=srtArrow,srtTime nextgroup=srtCoordinates
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
20 syn match srtArrow /-->/ contained contains=@NoSpell
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
21 syn match srtTime /\d\d:\d\d:\d\d[,.]\d\d\d/ contained contains=@NoSpell
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
22 syn match srtCoordinates /X1:\d\+ X2:\d\+ Y1:\d\+ Y2:\d\+/ contained contains=@NoSpell
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
23
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
24 " Bold
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
25 syn region srtBold matchgroup=srtFormat start=+<b>+ end=+</b>+ contains=@srtSpecial
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
26 syn region srtBold matchgroup=srtFormat start=+{b}+ end=+{/b}+ contains=@srtSpecial
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
27
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
28 " Italics
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
29 syn region srtItalics matchgroup=srtFormat start=+<i>+ end=+</i>+ contains=@srtSpecial
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
30 syn region srtItalics matchgroup=srtFormat start=+{i}+ end=+{/i}+ contains=@srtSpecial
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 " Strikethrough
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
33 syn region srtStrikethrough matchgroup=srtFormat start=+<s>+ end=+</s>+ contains=@srtSpecial
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
34 syn region srtStrikethrough matchgroup=srtFormat start=+{s}+ end=+{/s}+ contains=@srtSpecial
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
35
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
36 " Underline
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
37 syn region srtUnderline matchgroup=srtFormat start=+<u>+ end=+</u>+ contains=@srtSpecial
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
38 syn region srtUnderline matchgroup=srtFormat start=+{u}+ end=+{/u}+ contains=@srtSpecial
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 " Font
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
41 syn region srtFont matchgroup=srtFormat start=+<font[^>]\{-}>+ end=+</font>+ contains=@srtSpecial
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
42
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
43 " ASS tags
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
44 syn match srtTag /{\\[^}]\{1,}}/ contains=@NoSpell
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
45
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
46 " Special characters
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
47 syn match srtEscape /\\[nNh]/ contains=@NoSpell
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
48
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
49 hi def link srtArrow Delimiter
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
50 hi def link srtCoordinates Label
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
51 hi def link srtEscape SpecialChar
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
52 hi def link srtFormat Special
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
53 hi def link srtNumber Number
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
54 hi def link srtTag PreProc
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
55 hi def link srtTime String
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
56
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
57 hi srtBold cterm=bold gui=bold
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
58 hi srtItalics cterm=italic gui=italic
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
59 hi srtStrikethrough cterm=strikethrough gui=strikethrough
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
60 hi srtUnderline cterm=underline gui=underline
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
61
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
62 let b:current_syntax = 'srt'