Last active
November 24, 2024 08:36
-
-
Save gim-/4266afd946081032f634df3bca420071 to your computer and use it in GitHub Desktop.
Nvim Disable Arrow Keys
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
local map = vim.keymap.set | |
-- Disable arrows in every mode | |
map("n", "<Up>", ":echoe 'Get off my lawn!'<CR>") | |
map("n", "<Down>", ":echoe 'Get off my lawn!'<CR>") | |
map("n", "<Left>", ":echoe 'Get off my lawn!'<CR>") | |
map("n", "<Right>", ":echoe 'Get off my lawn!'<CR>") | |
map("i", "<Up>", "<C-o>:echoe 'Get off my lawn!'<CR>") | |
map("i", "<Down>", "<C-o>:echoe 'Get off my lawn!'<CR>") | |
map("i", "<Left>", "<C-o>:echoe 'Get off my lawn!'<CR>") | |
map("i", "<Right>", "<C-o>:echoe 'Get off my lawn!'<CR>") | |
map("v", "<Up>", ":<C-u>echoe 'Get off my lawn!'<CR>") | |
map("v", "<Down>", ":<C-u>echoe 'Get off my lawn!'<CR>") | |
map("v", "<Left>", ":<C-u>echoe 'Get off my lawn!'<CR>") | |
map("v", "<Right>", ":<C-u>echoe 'Get off my lawn!'<CR>") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment