Shift a subtitle file

A .srt or .vtt file's page has a "Shift every cue by (seconds)" field for writers. Type 2.5 or -1, press "Shift and save": every cue's start and end move by that much and the result is saved as one commit, "Shift subtitles by +2.5 s". Readers and guests see no field.

In the terminal

With a repository open, the palette offers "Shift subtitles" to a writer only. It asks for the file's path, then the seconds, and shifts the file on the default branch. It is the same action as the page (src/actions/subtitle_shift.ts), so the gate, the range, the commit message and the protected-branch rule are the same; the write is announced as a push, so an open web page of the file follows.

The pure shift is src/core/subtitle_shift.ts; the form is shiftForm in src/web/render/subtitles.ts, posting to the file edit route.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs