Quickly send file paths to the terminal.
- Send Active File Path: Send the relative path of the currently active editor file to the terminal
- Send Selected File Path: Send the relative path of the file selected in Explorer or Source Control to the terminal
- Send Selected Text: Send the selected text with file path and line number (e.g.,
src/file.ts:L10-L20) to the terminal
- Open Keyboard Shortcuts (
Cmd+K Cmd+S) - Search for "Quick File Path"
- Assign your preferred keybindings
{
"key": "cmd+;",
"command": "quickFilePath.sendActiveFilePath",
"when": "editorFocus && !editorHasSelection"
}{
"key": "cmd+;",
"command": "quickFilePath.sendSelectedText",
"when": "editorFocus && editorHasSelection"
}{
"key": "cmd+;",
"command": "quickFilePath.sendSelectedFilePath",
"when": "listFocus && (explorerViewletFocus || focusedView == 'workbench.scm')"
}Note:
sendSelectedFilePathuses the clipboard internally, so your clipboard contents will be overwritten.
