A Neovim plugin helping you establish good command workflow and habit
k
j
h
l
within a period of timeC
instead of c$
Recommended workflow:
5j
12-
) for vertical movement within the screen.CTRL-U
CTRL-D
CTRL-B
CTRL-F
gg
G
for vertical movement outside the screen.w
W
b
B
e
E
ge
gE
) for short-distance horizontal movement.f
F
t
T
,
;
0
^
$
for medium to long-distance horizontal movement.ci{
y5j
dap
) whenever possible.%
and square bracket commands (see :h [
) to jump between brackets.Learn more in this blog post
{
"m4xshen/hardtime.nvim",
opts = {}
},
use "m4xshen/hardtime.nvim"
Plug "m4xshen/hardtime.nvim"
init.lua
. This step is not needed with lazy.nvim if opts
is set as above.require("hardtime").setup()
You can pass your config table into the setup()
function or opts
if you use lazy.nvim.
max_time
(number): Maximum time (in milliseconds) to consider key presses as repeated.max_count
(number): Maximum count of repeated key presses allowed within the max_time
period.disable_mouse
(boolean): Disable mouse support.hint
(boolean): Enable hint messages for better commands.allow_different_key
(boolean): Allow different keys to reset the count.resetting_keys
(table of strings): Keys that reset the count.restricted_keys
(table of strings): Keys triggering the count mechanism.hint_keys
(table of strings): Keys that trigger hint messages.local config = {
max_time = 1000,
max_count = 2,
disable_mouse = true,
hint = true,
allow_different_key = false,
resetting_keys = { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9",
"c", "C", "d", "x", "X", "y", "Y", "p", "P" },
restricted_keys = { "h", "j", "k", "l", "-", "+", "gj", "gk" },
hint_keys = { "k", "j", "^", "$", "a", "i", "d", "y", "c", "l" },
disabled_keys = { "<UP>", "<DOWN>", "<LEFT>", "<RIGHT>" },
disabled_filetypes = { "qf", "netrw", "NvimTree", "lazy", "mason" }
}