mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-05 03:08:13 +00:00
feat(explorer): added ctrl+t to open a terminal in the item's directory
This commit is contained in:
parent
453f1a5d85
commit
81f90062c5
2 changed files with 7 additions and 0 deletions
|
@ -195,6 +195,12 @@ function M.picker_grep(_, item)
|
|||
end
|
||||
end
|
||||
|
||||
function M.terminal(_, item)
|
||||
if item then
|
||||
Snacks.terminal(nil, { cwd = Snacks.picker.util.dir(item) })
|
||||
end
|
||||
end
|
||||
|
||||
function M.cd(_, item)
|
||||
if item then
|
||||
vim.fn.chdir(Snacks.picker.util.dir(item))
|
||||
|
|
|
@ -88,6 +88,7 @@ M.explorer = {
|
|||
["u"] = "explorer_update",
|
||||
["<c-c>"] = "tcd",
|
||||
["<c-f>"] = "picker_grep",
|
||||
["<c-t>"] = "terminal",
|
||||
["."] = "explorer_focus",
|
||||
["I"] = "toggle_ignored",
|
||||
["H"] = "toggle_hidden",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue