Skip to content

How to mapping 's' with two different behavior #188

Answered by vurtune
vurtune asked this question in Q&A
Discussion options

You must be logged in to vote

vim.keymap.set({ "n", "x" }, "s", function () if vim.v.count == 0 then require("leap").leap {} else vim.api.nvim_feedkeys(vim.v.count .. "s", "n", false) end end, { desc = "Leap forward" })

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by vurtune
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant