A Neovim plugin that adds reading time estimates to Markdown headers. It displays timestamps as virtual text showing when each section will be reached based on average reading speed.
- 📊 Estimates reading time for each section based on word count
- ⏱️ Shows timestamps in HH:mm:ss format
- 🎨 Multiple display formats (full, range, short)
- ⚡ Configurable words per minute (WPM)
- 🔄 Auto-updates on file changes
- 📝 Skips code blocks in time estimation
- ✨ Handles Markdown formatting
Using lazy.nvim:
{
"nick-skriabin/timeline.nvim",
config = function()
require("timeline").setup({})
end,
}
Using packer.nvim:
use {
'nick-skriabin/timeline.nvim',
config = function()
require('timeline').setup({})
end
}
Timeline.nvim comes with the following defaults:
require('timeline').setup({
words_per_minute = 200, -- Average reading speed
format = 'full', -- 'full', 'range', or 'short'
enabled = true, -- Enable on startup
})
The plugin supports three display formats:
full
:[00:00:00 - 00:01:30 @ 01:30]
(start - end @ duration)range
:[00:00:00 - 00:01:30]
(start - end)short
:[00:00:00]
(start time only)
The plugin automatically activates for Markdown files. You can control it with:
:TimelineToggle
- Toggle timeline visibility
-- Toggle timeline visibility
require('timeline').toggle()
-- Update timeline calculations
require('timeline').update()
-- Change display format
require('timeline').set_format('short')
-- Change reading speed
require('timeline').set_wpm(250)
# Introduction [00:00:00 - 00:01:30 @ 01:30]
Content...
## First Section [00:01:30 - 00:03:45 @ 02:15]
More content...
## Second Section [00:03:45 - 00:05:00 @ 01:15]
Final content...
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - Copyright (c) 2024 Nick Skriabin
Thanks to all contributors and the Neovim community!