Skip to content

Instantly share code, notes, and snippets.

@0x61nas
Created July 21, 2024 16:07
Show Gist options
  • Select an option

  • Save 0x61nas/2066d9cd270a38822165a98a33ca017f to your computer and use it in GitHub Desktop.

Select an option

Save 0x61nas/2066d9cd270a38822165a98a33ca017f to your computer and use it in GitHub Desktop.
-- I use Dvorak layout, so.. no hjkl :|
-- Instead, I will use -kcd
local modes = {'n', 'v', 's', 'o'} -- Normal, visual, select, operator-pending
local keys = {{'h', '-'}, {'j', 'c'}, {'l', 'd'}}
for _, mode in ipairs(modes) do
for _, key in ipairs(keys) do
map(mode, key[1], key[2], {noremap = true})
map(mode, key[2], key[1], {noremap = true})
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment