Closed amesaine closed 2 weeks ago
Hi! First of all, I'm not sure I understand what you mean. You want the screenkey to display some key combos as some other key combos? Let me know if I got that right. And if I did get that right, here is an example of how you could do this without me introducing a new (possibly very complicated) feature:
return {
"NStefan002/screenkey.nvim",
lazy = false,
version = "*",
opts = {
filter = function(keys)
for i, key in ipairs(keys) do
if key.key == "Home" then
keys[i].key = "G"
end
end
return keys
end,
},
}
For more info on the filter
function, see readme.md of this repository or :h screenkey.nvim.txt
, and take a look at #38.
You want the screenkey to display some key combos as some other key
Yes. The code snippet works exactly as what I wanted thank you! I'll change the title to be clearer.
I remapped the basic vim motions and It would be nice if there was a way to represent the original keymaps still. This could either be done by specifying the keymap or enable displaying the original keymap through a provided option.
Then if someone were to see my screenkey, they wouldn't be confused with all the remaps.