Closed serranomorante closed 1 year ago
Unfortunately there isn't a way the plugin can work around this directly. You can use this:
local function jkmaps()
-- Navigate display lines
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 })
end
require('smart-splits').setup({
resize_mode = {
hooks = {
on_leave = jkmaps,
},
},
})
That is good enough! thank you.
Similar Issues
Neovim Version
NVIM v0.9.1
Multiplexer Integration
I don't use one
Multiplexer Version
No response
Steps to Reproduce
Disclaimer
j
ork
should move your cursor by display lines (it will not skip the wrapped text lines). Good, your keymap is working normally.j
andk
are skipping the wrapped lines (this should not happen)I think
vim.api.nvim_del_keymap
on fileresize_mode.lua
on line47-51
are the ones to blame.Expected Behavior
Entering resize mode should not delete my previous mapping.
Actual Behavior
Entering resize mode deletes my previous mapping.
Minimal Configuration to Reproduce
Additional Details and/or Screenshots
No response