From dbf42e470807695185c59cd62b3ca05d69d20e90 Mon Sep 17 00:00:00 2001 From: Rakshit Sinha Date: Fri, 10 Jan 2025 11:57:12 -0800 Subject: [PATCH] Allow line end/beginning navigation in normal mode as well --- lua/rakshit/core/keymaps.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/rakshit/core/keymaps.lua b/lua/rakshit/core/keymaps.lua index db37fd7a..9132cf83 100644 --- a/lua/rakshit/core/keymaps.lua +++ b/lua/rakshit/core/keymaps.lua @@ -57,8 +57,8 @@ vim.keymap.set("n", "tf", "tabnew %", { desc = "Open current bu vim.keymap.set("n", "if", " GoIfErr ", { desc = "Add if err != nil snippet" }) -- Borrowed from my VS Code settings for better Vim navigations -vim.keymap.set("n", "l", "$", { desc = "Move to end of the line with leader + l" }) -vim.keymap.set("n", "h", "_", { desc = "Move to first character of the line with leader + h" }) +vim.keymap.set({ "n", "v" }, "l", "$", { desc = "Move to end of the line with leader + l" }) +vim.keymap.set({ "n", "v" }, "h", "_", { desc = "Move to first character of the line with leader + h" }) -- Gitsigns to toggle hunk preview and git line blame vim.keymap.set("n", "gp", ":Gitsigns preview_hunk", { desc = "Preview changes made on the current line" })