Skip to content

Commit

Permalink
add colemak keybindings
Browse files Browse the repository at this point in the history
  • Loading branch information
vimkim committed Dec 2, 2023
1 parent 39ae082 commit 48f4003
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,29 @@ vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Go to previous dia
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next diagnostic message' })
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, { desc = 'Open floating diagnostic message' })
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostics list' })
local function map(mode, lhs, rhs, opts)
local options = { noremap = true, silent = true }
if opts then
options = vim.tbl_extend("force", options, opts)
end
vim.api.nvim_set_keymap(mode, lhs, rhs, options)
end

-- Vim for Colemak
map("", "n", "j", {})
map("", "e", "k", {})
map("", "i", "l", {})
map("", "j", "e", {})
map("", "k", "n", {})
map("", "l", "i", {})

map("", "N", "J", {})
map("", "E", "K", {})
map("", "I", "L", {})
map("", "J", "E", {})
map("", "K", "N", {})
map("", "L", "I", {})


-- [[ Highlight on yank ]]
-- See `:help vim.highlight.on_yank()`
Expand Down

0 comments on commit 48f4003

Please sign in to comment.