/srtedit.vim

Turn Vim into a lightweight subtitle editor

Primary LanguageVim Script

srt-edit

Turn Vim into a lightweight subtitle (SubRip) editor:

  • Uses MPV to preview video and subtitles
  • Provides commands and bindings to:
    • jump in the video feed to the selected subtitle
    • synchronise new subtitles with the video feed
    • quickly pause, rewind or fast-forward without leaving Vim
    • re-index all subtitles from 1 onwards

This is a very early version. More documentation or features to come.

Installation

  1. Install MPV
  2. Using Vim's built-in package support:
mkdir -p ~/.vim/pack/mcsf/start
cd ~/.vim/pack/mcsf/start
git clone https://github.com/mcsf/srtedit.vim.git

Usage

  • Open a *.srt subtitle file
  • Run :SrtEditStart some-video.mp4
  • Navigate through the subtitles as through any text file
  • Place the cursor over a subtitle and press <leader><cr> to jump in the video feed to that subtitle, for example
    • If you haven't configured your <leader> key, set it in ~.vimrc with let mapleader = " "
  • See all bindings in ftplugin/srt.vim