A minimal Neovim plugin that detects excessive key spamming (jjjjjj
) and suggests more efficient alternatives.
j
, k
, h
, l
, w
use 10j
):SpamStats
to view usage statsUsing lazy.nvim:
return { "timseriakov/spamguard.nvim" }
You can pass custom thresholds and suggestions for specific keys:
return {
"timseriakov/spamguard.nvim",
config = function()
require("spamguard").setup({
keys = {
j = { threshold = 6, suggestion = "use s or f instead of spamming jjjj 😎" },
k = { threshold = 6, suggestion = "try 10k instead of spamming kkkk 😎" },
h = { threshold = 8, suggestion = "use 10h or b / ge 😎" },
l = { threshold = 8, suggestion = "try w or e — it's faster! 😎" },
w = { threshold = 5, suggestion = "use s or f — more precise and quicker! 😎" },
},
})
end,
}
If a key is not listed in your config, it will fall back to the default behavior.
:SpamStats
— Show usage stats:
This plugin encourages better navigation habits by gently reminding you to use more efficient motion commands instead of repeatedly mashing navigation keys.
MIT © Tim Seriakov