From e417c2108df05a7cb5f4200eb4287d81f3ab80d9 Mon Sep 17 00:00:00 2001 From: S4NKALP Date: Tue, 7 Oct 2025 16:59:19 +0545 Subject: [PATCH] refactor(keys): allow H and L to work in visual mode --- lazy-lock.json | 2 +- lua/core/keys.lua | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index e72190e..9313ef5 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -10,7 +10,7 @@ "gitsigns.nvim": { "branch": "main", "commit": "1ee5c1fd068c81f9dd06483e639c2aa4587dc197" }, "gruvbox.nvim": { "branch": "main", "commit": "5e0a460d8e0f7f669c158dedd5f9ae2bcac31437" }, "harpoon": { "branch": "harpoon2", "commit": "ed1f853847ffd04b2b61c314865665e1dadf22c7" }, - "lazy.nvim": { "branch": "main", "commit": "59334064f8604ca073791c25dcc5c9698865406e" }, + "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, "lazygit.nvim": { "branch": "main", "commit": "2305deed25bc61b866d5d39189e9105a45cf1cfb" }, "lspsaga.nvim": { "branch": "main", "commit": "8efe00d6aed9db6449969f889170f1a7e43101a1" }, "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, diff --git a/lua/core/keys.lua b/lua/core/keys.lua index 7160f95..33ef5cd 100644 --- a/lua/core/keys.lua +++ b/lua/core/keys.lua @@ -28,8 +28,8 @@ map({ 'i', 'c' }, '', '') map('n', 'rL', vim.lsp.buf.rename, { desc = 'Rename Lsp Symbol' }) map('n', '`', "'", { noremap = true }) -- better marks -map('n', 'H', '^', { desc = 'Jump to line start' }) -map('n', 'L', '$', { desc = 'Jump to line end' }) +map({ 'n', 'v' }, 'H', '^', { desc = 'Move to the beginning of the line' }) +map({ 'n', 'v' }, 'L', '$', { desc = 'Move to the end of the line' }) -- Visual overwrite paste map({ 'v', 'x' }, 'p', '"_dP', opts)