Add syntax highlighting for SubRip Subtitle (.srt) files

This commit is contained in:
ema
2025-07-05 03:20:56 +08:00
parent 89571b1431
commit b42b7ce4e8
2 changed files with 74 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<SyntaxDefinition name="SubRip Subtitle" extensions=".srt">
<Environment>
<Default color="#D4D4D4" bgcolor="#1E1E1E"/>
<Selection color="#1E1E1E" bgcolor="#264F78"/>
<LineNumbers color="#858585" bgcolor="#1E1E1E"/>
<CaretMarker color="#AEAFAD"/>
</Environment>
<Digits name="Digits" color="#B5CEA8"/>
<RuleSets>
<RuleSet ignorecase="false">
<Delimiters>:,-&gt; &lt;&gt;</Delimiters>
<!-- Arrow symbol -->
<KeyWords name="Arrow" color="#D7BA7D" bold="true">
<Key word="-->" />
</KeyWords>
<!-- HTML formatting tags -->
<KeyWords name="HtmlTag" color="#4EC9B0" bold="false">
<Key word="&lt;i&gt;" />
<Key word="&lt;/i&gt;" />
<Key word="&lt;b&gt;" />
<Key word="&lt;/b&gt;" />
<Key word="&lt;u&gt;" />
<Key word="&lt;/u&gt;" />
<Key word="&lt;font" />
<Key word="&lt;/font&gt;" />
</KeyWords>
</RuleSet>
</RuleSets>
</SyntaxDefinition>

View File

@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<SyntaxDefinition name="SubRip Subtitle" extensions=".srt">
<Environment>
<Default color="#000000" bgcolor="#FFFFFF"/>
<Selection color="#FFFFFF" bgcolor="#0078D4"/>
<LineNumbers color="#2B91AF" bgcolor="#FFFFFF"/>
<CaretMarker color="#000000"/>
</Environment>
<Digits name="Digits" color="#098658"/>
<RuleSets>
<RuleSet ignorecase="false">
<Delimiters>:,-&gt; &lt;&gt;</Delimiters>
<!-- Arrow symbol -->
<KeyWords name="Arrow" color="#AF00DB" bold="true">
<Key word="-->" />
</KeyWords>
<!-- HTML formatting tags -->
<KeyWords name="HtmlTag" color="#0000FF" bold="false">
<Key word="&lt;i&gt;" />
<Key word="&lt;/i&gt;" />
<Key word="&lt;b&gt;" />
<Key word="&lt;/b&gt;" />
<Key word="&lt;u&gt;" />
<Key word="&lt;/u&gt;" />
<Key word="&lt;font" />
<Key word="&lt;/font&gt;" />
</KeyWords>
</RuleSet>
</RuleSets>
</SyntaxDefinition>