Created
August 26, 2023 21:56
-
-
Save shurizzle/0d0b66183327c6140ab10a9605089656 to your computer and use it in GitHub Desktop.
Just learn vim
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for _, key in ipairs({ "Left", "Right", "Up", "Down", "PageUp", "PageDown", "End", "Home", "Del" }) do | |
local name = key == "Del" and "Delete" or key | |
for mode, prefix in pairs({ n = "<cmd>", v = "<cmd><C-u>", i = "<C-o><cmd>" }) do | |
vim.keymap.set( | |
mode, | |
("<" .. key .. ">"), | |
(prefix .. 'echo "No ' .. name .. ' for you!<CR>"'), | |
{ silent = true, noremap = false } | |
) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment