I want to use the VS Code breadcrumbs bar(the bar just below the file name bar) to open a terminal with specific path quickly, like right-click
, ctrl-click
or other keybinding shortcuts. Is it possible? Is there other way to open a terminal with specific path quickly?
I searched the settings in VS Code code navigation, but didn’t get what I want.
2
Answers
Relating to @starball 's suggestion, there exists a default(maybe) keybinding shortcut
cmd K
+P
(MacOS) to copy the path of the active file.I’m not aware of a way with breadcrumbs, but there are at least two workarounds:
Right click the folder/directory in the Explorer View and then click "Open in Integrated Terminal". This may be easier to find if you have the
explorer.autoReveal
setting left at its default value oftrue
. For this workaround, you might also be interested in this feature-request: https://github.com/microsoft/vscode/issues/67711.Use the
File: Copy Path of Active File
command in the command palette (or whatever keybinding it is bound to. I think the default is ctrl/cmd+p). Then paste that into acd
command in your shell.