Skip to content

Commit

Permalink
feat: add <C-t> map that does :tcd instead of :cd
Browse files Browse the repository at this point in the history
  • Loading branch information
mawkler committed Feb 7, 2023
1 parent 856af0d commit 5b3bc3a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,12 @@ vim.keymap.set("n", "<leader>cd", t.extensions.zoxide.list)
action = function(selection)
builtin.find_files({ cwd = selection.path })
end
}
},
["<C-t>"] = {
action = function(selection)
vim.cmd.tcd(selection.path)
end
},
}
}
```
Expand All @@ -166,6 +171,7 @@ vim.keymap.set("n", "<leader>cd", t.extensions.zoxide.list)
| Action | Description | Command executed |
| ------- | ---------------------------------------------------- | ------------------------------------------------ |
| `<CR>` | Change current directory to selection | `cd <path>` |
| `<C-t>` | Change current tab's directory to selection | `tcd <path>` |
| `<C-s>` | Open selection in a split | `split <path>` |
| `<C-v>` | Open selection in a vertical split | `vsplit <path>` |
| `<C-e>` | Open selection in current window | `edit <path>` |
Expand Down
7 changes: 6 additions & 1 deletion lua/telescope/_extensions/zoxide/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@ local default_config = {
action = function(selection)
builtin.find_files({ cwd = selection.path })
end
}
},
["<C-t>"] = {
action = function(selection)
vim.cmd.tcd(selection.path)
end
},
}
}

Expand Down

0 comments on commit 5b3bc3a

Please sign in to comment.