Closed serranomorante closed 11 months ago
Describe the bug Out of pure ignorance on my part, why does this keymap work correctly:
vim.keymap.set({ "n", "x" }, "j", 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', { noremap = true, expr = true, desc = "Move down by display lines" }) vim.keymap.set({ "n", "x" }, "k", 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', { noremap = true, expr = true, desc = "Move up by display lines" })
while this one completely blocks j/k navigation:
vim.keymap.set({ "n", "x" }, "j", function() return vim.v.count > 0 and "j" or "gj" end, { noremap = true, expr = true }) vim.keymap.set({ "n", "x" }, "k", function() return vim.v.count > 0 and "k" or "gk" end, { noremap = true, expr = true })
Both keymaps work correctly without hardtime.nvim!
Config options
To Reproduce Steps to reproduce the behavior:
Expected behavior Both keymaps should be valid to use on hardtime.
Thanks for the feedback!
Describe the bug Out of pure ignorance on my part, why does this keymap work correctly:
while this one completely blocks j/k navigation:
Both keymaps work correctly without hardtime.nvim!
Config options
To Reproduce Steps to reproduce the behavior:
Expected behavior Both keymaps should be valid to use on hardtime.