nvim: add t/T bind to leap

This commit is contained in:
dogeystamp 2023-04-26 19:19:20 -04:00
parent 3b9953f2dc
commit c723a3cac9
Signed by: dogeystamp
GPG Key ID: 7225FE3592EFFA38

View File

@ -90,6 +90,18 @@ require('dressing').setup({
-- fancy motions (leap.nvim)
vim.keymap.set({'n', 'x', 'o'}, 'f', '<Plug>(leap-forward-to)')
vim.keymap.set({'n', 'x', 'o'}, 'F', '<Plug>(leap-backward-to)')
vim.keymap.set(
{'n', 'x', 'o'}, 't',
function ()
require("leap").leap { offset = 2 }
end
)
vim.keymap.set(
{'n', 'x', 'o'}, 'T',
function ()
require("leap").leap { backward = true, offset = 2 }
end
)
require('leap').opts.safe_labels = {
"a", "s", "d", "f", "g", "h", "j", "k", "l"
}