From 8b5ffaa227ec2f052444bcd1947e92d6a620724c Mon Sep 17 00:00:00 2001 From: Crony Akatsuki Date: Tue, 21 Oct 2025 10:29:57 +0200 Subject: [PATCH] feat(keybinding): get current file path --- lua/config/keybindings.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lua/config/keybindings.lua b/lua/config/keybindings.lua index 7e4c741..6397476 100644 --- a/lua/config/keybindings.lua +++ b/lua/config/keybindings.lua @@ -24,3 +24,10 @@ vim.keymap.set("v", ">", ">gv", { desc = "Indent right and reselect" }) -- file exploring vim.keymap.set("n", "e", ":Oil", { desc = "Open oil file explorer" }) + +-- Copy Full File-Path +vim.keymap.set("n", "yp", function() + local path = vim.fn.expand("%:p") + vim.fn.setreg("+", path) + print("file:", path) +end)