How to disable the arrows in Nvim
The arrows are tempting: fingers are lazy about learning hjkl, and four keys under your thumb are a ready-made dopamine bar. But the moment you drag your hands off the home row, your speed goes down the drain — and that speed is the very reason you started torturing this editor.
This loop disables arrow-key movement
-- disable arrows
for _, mode in pairs({ 'n', 'i', 'v', 'x' }) do
for _, key in pairs({ '<Up>', '<Down>', '<Left>', '<Right>' }) do
vim.keymap.set(mode, key, '<nop>')
end
end
To move in editing mode you can use <Ctrl> + {hjkl}
It is also recommended to disable CapsLock — after all, <Shift + j> joins lines — it is very easy to press it by accident. A key your fingers hate, and the mouse is to blame for everything — take it off the keyboard and one error fewer right away.