Sublime Forum

.SRT file format highlighter?

#1

Hello, I’m using the latest SublimeText3 build and I need to make a syntax highlighter for .SRT files, and unfortunately I have no idea how to make this. I searched the net a lot and can’t find any useful info regarding the subject. In any tutorial i found they talking about a package called AAADev, but unfortunately this package is not available for ST3.

If somebody knows a working solution for SublimeText3 how to create a new file syntax highlighter please post.

The syntax of .srt files is as follows:

1
00:00:05,803 --> 00:00:10,574
TITLE
OF THE MOVIE

2
00:00:10,801 --> 00:00:13,670
PART I
some text

3
00:00:15,296 --> 00:00:19,402
And a lot more text
to display …

0 Likes

#2

I made one really simple: gist.github.com/weslly/8104212

Here’s how it looks:

To use it, just open your packages directory and put it in your User folder (or create a SRT directory to put it).

1 Like

#3

Thank you. Just what I needed.

0 Likes

#4

Wonderfull… thanks.
I added this to my user folder, however this syntax does not show up in the syntax list.

Some extra step i will need to make?

Many thanks, robert

0 Likes

#5

If I were you, the first thing I do will be searching if there are SRT-related package on Package Control or not.
https://packagecontrol.io/search/srt

1 Like

#6

Many thanks for answering.
I only want the timecode showing up in a different color.
Editing i do in “Subtitle Edit”

Regards, Robert

0 Likes