diff options
| author | Crony Akatsuki <crony@cronyakatsuki.xyz> | 2025-10-21 10:29:57 +0200 |
|---|---|---|
| committer | Crony Akatsuki <crony@cronyakatsuki.xyz> | 2025-10-21 10:29:57 +0200 |
| commit | 8b5ffaa227ec2f052444bcd1947e92d6a620724c (patch) | |
| tree | 7f4f6654e22d6558408848d42d7c9afa8ace25ec /lua | |
| parent | 479f03bbecf474664a0f3b289e83f49dc96badb2 (diff) | |
| download | nvim-8b5ffaa227ec2f052444bcd1947e92d6a620724c.zip nvim-8b5ffaa227ec2f052444bcd1947e92d6a620724c.tar.gz | |
feat(keybinding): get current file path
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/config/keybindings.lua | 7 |
1 files changed, 7 insertions, 0 deletions
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", "<Leader>e", ":Oil<CR>", { desc = "Open oil file explorer" }) + +-- Copy Full File-Path +vim.keymap.set("n", "<leader>yp", function() + local path = vim.fn.expand("%:p") + vim.fn.setreg("+", path) + print("file:", path) +end) |
