From 12f47e852d5db80d9ac95690bb9a117ccff2c4e3 Mon Sep 17 00:00:00 2001 From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> Date: Fri, 14 Feb 2025 16:48:41 +0900 Subject: updates --- ar/.config/TheSiahxyz/lua/thesiahxyz/core/keymaps.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'ar/.config/TheSiahxyz/lua/thesiahxyz/core/keymaps.lua') diff --git a/ar/.config/TheSiahxyz/lua/thesiahxyz/core/keymaps.lua b/ar/.config/TheSiahxyz/lua/thesiahxyz/core/keymaps.lua index 044b9cf..cc206ab 100644 --- a/ar/.config/TheSiahxyz/lua/thesiahxyz/core/keymaps.lua +++ b/ar/.config/TheSiahxyz/lua/thesiahxyz/core/keymaps.lua @@ -178,6 +178,17 @@ vim.keymap.set("n", "oq", "copen", { desc = "Open quickfix list -- Formats vim.keymap.set("n", "cF", vim.lsp.buf.format, { desc = "Format buffer by default lsp" }) +-- Full path +vim.keymap.set("n", "zf", function() + local word = vim.fn.expand("") -- Get full text under the cursor (handles paths with slashes) + if word:match("%$") then + local expanded_path = vim.fn.expand(word) + if expanded_path ~= word then + vim.cmd("normal! ciW" .. expanded_path) -- Replace entire word under cursor + end + end +end, { desc = "Expand and replace path under cursor" }) + -- Git -- create repository vim.keymap.set("n", "gR", function() -- cgit v1.2.3