Skip to content

Commit 5974d98

Browse files
committed
feat(oil): testing out gY for copy current oil directory
1 parent 560089d commit 5974d98

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

lua/peter/plugins/core/oil.lua

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ return {
2121
["<localleader>|"] = { "actions.select", opts = { vertical = true } },
2222
["<localleader>-"] = { "actions.select", opts = { horizontal = true } },
2323
["<localleader>r"] = { "actions.refresh" },
24+
["gY"] = {
25+
function()
26+
local dir = require("oil").get_current_dir()
27+
vim.fn.setreg('"', dir)
28+
end,
29+
desc = "Yank current directory",
30+
},
2431
},
2532
},
2633
},

0 commit comments

Comments
 (0)