spellbound_demo.mp4
spellbound.nvim is a Neovim plugin that introduces a new 'pseudo-mode' to
Neovim focused on making spellchecking a breeze.
The idea sprung to mind when I realised a common and helpful keybind was 1z=
(accept first suggestion), which for me is the right suggestion about about 80%
of the time...
Using your package manager (e.g. lazy)
{
'samuelstranges/spellbound.nvim',
config = function()
require('spellbound').setup()
end,
}Spellbound is activated with <leader>S and returns to normal mode with Esc.
When spellcheck mode is active, you have access to:
w: go to next incorrect word with suggestion preview (]s)b: go to previous incorrect word with suggestion preview ([s)a: auto-fix; accept first suggestion (1z=)c: change current word (ciw)d: add to dictionary (zg)i: ignore spelling (zG)u: undo (u)s: spelling suggestions to choose from (z=)t: toggle suggestion preview on/offEsc: return to normal mode
When the mode is active, a small UI panel appears at the bottom of the screen showing the available commands for quick reference. A preview of the first suggestion appears above misspelled words when navigating between them.
require('spellbound').setup({
-- UI options
ui = {
enable = true, -- Enable the UI helper window
suggestion_preview = true, -- Enable suggestion preview
},
-- Key mapping options
mappings = {
leader = '<leader>S', -- Key to enter spellcheck mode
}
})- Custom Colors?
- Bug fixes e.g. weird things happening when preceded by a single quote
- Example video
- Disable other keybindings while in mode?
- Editing multiple entries at once (gets a bit wonky)
- Inspired by nvim-colorizer for highlight implementation patterns