diff options
| author | triethyl <triethylammonium@pm.me> | 2025-09-16 14:46:10 -0400 |
|---|---|---|
| committer | triethyl <triethylammonium@pm.me> | 2025-09-16 14:46:10 -0400 |
| commit | c50fdd83e19ce932b1a402f81de936a1a0dacf30 (patch) | |
| tree | f1597621f96979393e649b676760af238a515f8d /pkgs | |
| parent | b2993716896bd32beda6c60cf19799dceaaa4f83 (diff) | |
neovim: updated keymaps
Diffstat (limited to 'pkgs')
| -rw-r--r-- | pkgs/custom-neovim/config/lua/keymaps.lua | 28 | ||||
| -rw-r--r-- | pkgs/custom-neovim/todo.md | 1 |
2 files changed, 15 insertions, 14 deletions
diff --git a/pkgs/custom-neovim/config/lua/keymaps.lua b/pkgs/custom-neovim/config/lua/keymaps.lua index 6831834..efaa7d7 100644 --- a/pkgs/custom-neovim/config/lua/keymaps.lua +++ b/pkgs/custom-neovim/config/lua/keymaps.lua @@ -1,7 +1,7 @@ -- Create keymap function local mapkey = function(mode, key, desc, action, plugin) local keymapper = plugin and require("lz.n").keymap(plugin).set or vim.keymap.set - keymapper(mode, key, action, {noremap = true, silent = true, desc = desc}) + keymapper(mode, key, action, { noremap = true, silent = true, desc = desc }) end -- Set the leader key @@ -21,7 +21,7 @@ mapkey("n", "<leader>e", "Open file manager", ":lua MiniFiles.open()<cr>", "mini mapkey("n", "<leader>g", "Manage git", "") mapkey("n", "<leader>gg", "Open neogit", ":Neogit<cr>", "neogit") mapkey("n", "<leader>ga", "Git add", ":Git add %:p<cr>", "mini-git") -mapkey("n", "<leader>gA", "Git add cwd", function() vim.cmd("Git add "..vim.fn.getcwd().."/.") end, "mini-git") +mapkey("n", "<leader>gA", "Git add cwd", function() vim.cmd("Git add " .. vim.fn.getcwd() .. "/.") end, "mini-git") mapkey("n", "<leader>gr", "Git remove", ":Git rm %:p<cr>", "mini-git") mapkey("n", "<leader>gc", "Git commit", ":Git commit<cr>", "mini-git") mapkey("n", "<leader>gs", "Git status", ":Git status<cr>", "mini-git") @@ -56,22 +56,22 @@ mapkey("n", "zq", "Toggle spellcheck", ":set spell!<cr>") mapkey("n", "z=", "Pick spelling suggestions", ":Pick spellsuggest<cr>") -- Do operations without yanking -mapkey({"n", "v"}, "<leader>d", "Fully delete", [["_d]]) -mapkey({"n", "v"}, "<leader>D", "Fully delete line", [["_D]]) -mapkey({"n", "v"}, "<leader>x", "Fully delete character", [["_x]]) -mapkey({"n", "v"}, "<leader>X", "Fully delete previous character", [["_X]]) -mapkey({"n", "v"}, "<leader>c", "Fully change", [["_c]]) -mapkey({"n", "v"}, "<leader>C", "Fully change line", [["_C]]) -mapkey({"v"}, "<leader>p", "Fully put", [[P]]) +mapkey({ "n", "v" }, "<leader>d", "Fully delete", [["_d]]) +mapkey({ "n", "v" }, "<leader>D", "Fully delete line", [["_D]]) +mapkey({ "n", "v" }, "<leader>x", "Fully delete character", [["_x]]) +mapkey({ "n", "v" }, "<leader>X", "Fully delete previous character", [["_X]]) +mapkey({ "n", "v" }, "<leader>c", "Fully change", [["_c]]) +mapkey({ "n", "v" }, "<leader>C", "Fully change line", [["_C]]) +mapkey({ "v" }, "<leader>p", "Fully put", [[P]]) -- Paste on newline mapkey("n", "<leader>p", "Paste on newline", ":pu<cr>") -- Visual Movement Keys -mapkey({"n", "v"}, "j", "Go down visually", "gj") -mapkey({"n", "v"}, "k", "Go up visually", "gk") -mapkey({"n", "v"}, "<down>", "Go down visually", "g<down>") -mapkey({"n", "v"}, "<up>", "Go up visually", "g<up>") +mapkey({ "n", "v" }, "j", "Go down visually", "gj") +mapkey({ "n", "v" }, "k", "Go up visually", "gk") +mapkey({ "n", "v" }, "<down>", "Go down visually", "g<down>") +mapkey({ "n", "v" }, "<up>", "Go up visually", "g<up>") -- Falling key mapkey("n", "<leader>u", "Make it rain", ":CellularAutomaton make_it_rain<cr>", "cellular-automaton.nvim") @@ -81,5 +81,5 @@ mapkey("t", "<Esc><Esc>", "Exit terminal insert mode", "<C-\\><C-n>") vim.keymap.set("c", "<cr>", function() if vim.fn.pumvisible() == 1 then return '<c-y>' end return '<cr>' -end, { expr = true }) -- Make enter complete command. +end, { expr = true }) -- Make enter complete command. mapkey("n", "<esc>", "Clear highlights", ":noh<cr>") -- Make esc clear highlights diff --git a/pkgs/custom-neovim/todo.md b/pkgs/custom-neovim/todo.md index 1ee9878..f67e47a 100644 --- a/pkgs/custom-neovim/todo.md +++ b/pkgs/custom-neovim/todo.md @@ -3,6 +3,7 @@ - make normal keybinds override calendar keybinds - add box drawing and special comments plugin - make <esc> hide lsp hover from K +- add window layout presets ## Eventually if Possible |
