annotate runtime/syntax/ssa.vim @ 33744:4006051bf85d v9.0.2098

patch 9.0.2098: No filetype support for xcompose files Commit: https://github.com/vim/vim/commit/4f9074b96cc7efb1c829ca74902a851551dcf4e8 Author: ObserverOfTime <chronobserver@disroot.org> Date: Sat Nov 11 09:12:27 2023 +0100 patch 9.0.2098: No filetype support for xcompose files Problem: No filetype support for xcompose files Solution: Add filetype detection closes: #13508 Signed-off-by: ObserverOfTime <chronobserver@disroot.org> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Sat, 11 Nov 2023 09:15:04 +0100
parents 3295247d97a5
children 8de906dadd4a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
30875
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
1 " Vim syntax file
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
2 " Language: SubStation Alpha
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
3 " Maintainer: ObserverOfTime <chronobserver@disroot.org>
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
4 " Filenames: *.ass,*.ssa
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
5 " Last Change: 2022 Oct 10
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
6
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
7 if exists('b:current_syntax')
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
8 finish
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
9 endif
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
10
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
11 " Comments
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
12 syn keyword ssaTodo TODO FIXME NOTE XXX contained
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
13 syn match ssaComment /^\(;\|!:\).*$/ contains=ssaTodo,@Spell
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
14 syn match ssaTextComment /{[^}]*}/ contained contains=@Spell
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
15
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
16 " Sections
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
17 syn match ssaSection /^\[[a-zA-Z0-9+ ]\+\]$/
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
18
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
19 " Headers
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
20 syn match ssaHeader /^[^;!:]\+:/ skipwhite nextgroup=ssaField
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
21
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
22 " Fields
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
23 syn match ssaField /[^,]*/ contained skipwhite nextgroup=ssaDelimiter
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
24
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
25 " Time
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
26 syn match ssaTime /\d:\d\d:\d\d\.\d\d/ contained skipwhite nextgroup=ssaDelimiter
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
27
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
28 " Delimiter
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
29 syn match ssaDelimiter /,/ contained skipwhite nextgroup=ssaField,ssaTime,ssaText
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
30
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
31 " Text
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
32 syn match ssaText /\(^Dialogue:\(.*,\)\{9}\)\@<=.*$/ contained contains=@ssaTags,@Spell
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
33 syn cluster ssaTags contains=ssaOverrideTag,ssaEscapeChar,ssaTextComment,ssaItalics,ssaBold,ssaUnderline,ssaStrikeout
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
34
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
35 " Override tags
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
36 syn match ssaOverrideTag /{\\[^}]\+}/ contained contains=@NoSpell
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
37
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
38 " Special characters
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
39 syn match ssaEscapeChar /\\[nNh{}]/ contained contains=@NoSpell
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
40
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
41 " Markup
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
42 syn region ssaItalics start=/{\\i1}/ end=/{\\i0}/ matchgroup=ssaOverrideTag keepend oneline contained contains=@ssaTags,@Spell
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
43 syn region ssaBold start=/{\\b1}/ end=/{\\b0}/ matchgroup=ssaOverrideTag keepend oneline contained contains=@ssaTags,@Spell
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
44 syn region ssaUnderline start=/{\\u1}/ end=/{\\u0}/ matchgroup=ssaOverrideTag keepend oneline contained contains=@ssaTags,@Spell
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
45 syn region ssaStrikeout start=/{\\s1}/ end=/{\\s0}/ matchgroup=ssaOverrideTag keepend oneline contained contains=@ssaTags,@Spell
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
46
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
47 hi def link ssaDelimiter Delimiter
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
48 hi def link ssaComment Comment
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
49 hi def link ssaEscapeChar SpecialChar
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
50 hi def link ssaField String
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
51 hi def link ssaHeader Label
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
52 hi def link ssaSection StorageClass
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
53 hi def link ssaOverrideTag Special
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
54 hi def link ssaTextComment Comment
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
55 hi def link ssaTime Number
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
56 hi def link ssaTodo Todo
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
57
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
58 hi ssaBold cterm=bold gui=bold
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
59 hi ssaItalics cterm=italic gui=italic
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
60 hi ssaStrikeout cterm=strikethrough gui=strikethrough
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
61 hi ssaUnderline cterm=underline gui=underline
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
62
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
63 let b:current_syntax = 'srt'