Remove hjkl bindings as they make no sense what so ever when using colemak, I have my own keyboard layer setup for the arrow keys there.

This commit is contained in:
Martin Larsson 2024-04-10 13:06:58 +02:00
parent d949b834d6
commit 45555751eb

View file

@ -5,10 +5,23 @@ g.maplocalleader = " "
require("utils").add_keymaps({ require("utils").add_keymaps({
n = { n = {
-- Disable hjkl, using Colemak
["h"] = {
cmd = "<Nop>",
},
["j"] = {
cmd = "<Nop>",
},
["k"] = {
cmd = "<Nop>",
},
["l"] = {
cmd = "<Nop>",
},
-- Navigation -- Navigation
["<C-Left>"] = { ["<C-Left>"] = {
cmd = "<C-w>h", cmd = "<C-w>h",
}, },
["<C-Down>"] = { ["<C-Down>"] = {
cmd = "<C-w>j", cmd = "<C-w>j",
}, },
@ -48,14 +61,14 @@ require("utils").add_keymaps({
cmd = "v:count || mode(1)[0:1] == \"no\" ? \"j\" : \"gj\"", cmd = "v:count || mode(1)[0:1] == \"no\" ? \"j\" : \"gj\"",
opts = { opts = {
expr = true expr = true
} }
}, },
-- Maps to remove -- Maps to remove
["<C-z>"] = { ["<C-z>"] = {
cmd = "<Nop>", cmd = "<Nop>",
}, },
}, },
i = { }, i = {},
v = { v = {
["<Up>"] = { ["<Up>"] = {
cmd = "v:count || mode(1)[0:1] == \"no\" ? \"k\" : \"gk\"", cmd = "v:count || mode(1)[0:1] == \"no\" ? \"k\" : \"gk\"",
@ -67,7 +80,7 @@ require("utils").add_keymaps({
cmd = "v:count || mode(1)[0:1] == \"no\" ? \"j\" : \"gj\"", cmd = "v:count || mode(1)[0:1] == \"no\" ? \"j\" : \"gj\"",
opts = { opts = {
expr = true expr = true
} }
}, },
["<tab>"] = { ["<tab>"] = {
cmd = ">gv", cmd = ">gv",
@ -78,16 +91,16 @@ require("utils").add_keymaps({
}, },
x = { x = {
["<Up>"] = { ["<Up>"] = {
cmd = "v:count || mode(1)[0:1] == \"no\" ? \"k\" : \"gk\"", cmd = "v:count || mode(1)[0:1] == \"no\" ? \"k\" : \"gk\"",
opts = { opts = {
expr = true expr = true
} }
}, },
["<Down>"] = { ["<Down>"] = {
cmd = "v:count || mode(1)[0:1] == \"no\" ? \"j\" : \"gj\"", cmd = "v:count || mode(1)[0:1] == \"no\" ? \"j\" : \"gj\"",
opts = { opts = {
expr = true expr = true
} }
}, },
["p"] = { ["p"] = {
cmd = "p:let @+=@0<CR>:let @\"=@0<CR>", cmd = "p:let @+=@0<CR>:let @\"=@0<CR>",