Skip to content

kivanceski/rsvp.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rsvp.nvim

GitHub Workflow Status Lua

rsvp.nvim is a speed-reading plugin for Neovim built around RSVP (Rapid Serial Visual Presentation). It opens a focused fullscreen reader and displays one word at a time from a selected text range so you can read quickly without eye-scanning lines.

rsvp.mp4

Features

  • Read any selected range (or full buffer) one word at a time
  • Optimal Recognition Point (ORP)-centered rendering with accented focus character (RsvpAccent)
  • Fullscreen floating RSVP reader for distraction-free reading
  • Play/pause, reset, and step backward/forward through words
  • Adjustable WPM with clamped limits (50 to 1000)
  • Live progress info (current/total, percentage, WPM)
  • Optional surrounding-word context (0..3 words on each side)
  • Progress bar and completion elapsed time
  • Built-in help popup (g?)
  • Configurable speed step, progress width, and keymaps

Optimal Recognition Point (ORP) Selection Logic

rsvp.nvim uses a Spritz-style stepped Optimal Recognition Point (ORP) mapping based on the word's alphanumeric length (surrounding punctuation is ignored):

Alphanumeric word length Optimal Recognition Point (ORP) character index (1-based)
1 1
2-5 2
6-9 3
10-13 4
14+ 5

Installation

Using lazy.nvim:

{
  "kivanceski/rsvp.nvim",
}

Usage examples:

  • :Rsvp to read the whole file
  • :10,40Rsvp to read lines 10 through 40
  • Visual-select lines, then run :Rsvp

Configuration (all defaults shown)

This example sets every option to its current default value. Keep this as a reference and override only the values you want to change.

{
  "kivanceski/rsvp.nvim",
  opts = {
    auto_run = true, -- Start playback immediately after opening the RSVP window
    initial_wpm = 300, -- Starting words-per-minute speed
    wpm_step_size = 25, -- Amount added/removed when changing WPM
    progress_bar_width = 80, -- Progress bar width in characters
    surrounding_word_count = 1, -- Show up to N words on each side of the active word (0..3, invalid => 1)
    keymaps = {
      decrease_wpm = "<", -- Decrease WPM by `wpm_step_size`
      increase_wpm = ">", -- Increase WPM by `wpm_step_size`
      previous_step = "H", -- Move one word backward
      next_step = "L", -- Move one word forward
    },
    colors = {
      main = {
        link = "Keyword", -- Any `nvim_set_hl()` option is supported
      },
      accent = {
        link = "ErrorMsg",
      },
      paused = {
        fg = "#FFFF00",
        bold = true,
      },
      done = {
        fg = "#00FF00",
        bold = true,
      },
      ghost_text = {
        link = "NonText",
      },
    },
  },
}

opts.colors.<group> accepts the full vim.api.nvim_set_hl() option table.

surrounding_word_count controls how many neighboring words are rendered around the active word.
Examples:

  • 0: only active word
  • 1: one word on the left and one on the right (when available)
  • 3: up to three words on each side (max supported)

Invalid values (non-numeric, negative, or greater than 3) are treated as 1.

In-window defaults that are always available:

  • Quit: q or <Esc>
  • Play/Pause: <Space>
  • Reset: r
  • Help: g?

User Commands

Command What it does
:Rsvp Starts RSVP on the given range (default range is %, the whole buffer).
:RsvpPlay Starts or resumes playback in an active RSVP session.
:RsvpPause Pauses playback in an active RSVP session.
:RsvpReset Restarts the current RSVP session from the beginning.
:RsvpDecreaseWpm Decreases speed by 25 WPM.
:RsvpIncreaseWpm Increases speed by 25 WPM.
:RsvpPreviousStep Moves back one word.
:RsvpNextStep Moves forward one word.

Highlight Groups

Highlight Group Used in
RsvpMain Key hints in the help popup, keymap hints in the status line, g? in the help hint line, and the completed part of the progress bar.
RsvpAccent The ORP (Optimal Recognition Point) character of the active word.
RsvpPaused PAUSED marker in the top status line when playback is paused.
RsvpDone DONE marker in the elapsed-time line shown after playback finishes.
RsvpGhostText Unfinished part of the progress bar and surrounding words (when surrounding_word_count > 0).

Similar Plugins

About

Rapid serial visual presentation plugin for Neovim

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •