🪴 my neovim config:)
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

keybinds: remove directionalmap

robin f656ea7c c07649a6

-14
-14
config/lua/ivy/config/keybinds.lua
··· 1 - local function directionalmap(mode, lhs, f, fmt) 2 - vim.iter(ipairs({ { "h", "left" }, { "j", "down" }, { "k", "up" }, { "l", "right" } })):each(function(_, map) 3 - local d = map[1] 4 - local _lhs = lhs:format(d) 5 - local direction = map[2] 6 - vim.keymap.set(mode, _lhs, f(d), { noremap = true, silent = true, desc = fmt:format(direction) }) 7 - end) 8 - end 9 - 10 1 local function cbcall(fn, ...) 11 2 local props = { ... } 12 3 return function() ··· 39 30 -- [file] 40 31 vim.keymap.set("n", "<C-s>", cbcall(vim._with, { noautocmd = true }, cbcall(vim.cmd, "write")), { desc = "save file" }) 41 32 vim.keymap.set("n", "<C-j>", "<C-^>", { desc = "edit alt file" }) 42 - 43 - -- [window movement] 44 - directionalmap("n", "<leader>w%s", function(lhs) 45 - return cbcall(vim.cmd.wincmd, lhs) 46 - end, "switch window %s") 47 33 48 34 -- [fixup] 49 35 vim.keymap.set("n", "s", "<nop>", { desc = "disable |s|" })