I use a swedish keyboard and want to remap the å, ä, ö characters to more useful keys while programming. For example, I want ö to output [. How can I achieve this in all modes in neovim?
I have tried this in a lua file:
local modes = {‘n’, ‘i’, ‘c’, ‘v’, ‘s’, ‘x’, ‘o’, ‘t’}
— Remap ‘ö’ to ‘[‘ in all modes
for _, mode in ipairs(modes) do
vim.keymap.set(mode, ‘ö’, ‘[‘, { remap = true, silent = true })
end
but it does not work for “f” (finding the [-character) and command mode.
Anton Janshagen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.