In vscode I want direct keyboard shortcuts assigned to specific files, the most used, in the active project, something like
Alt+1 -> sourcefile1.ts
Alt+2 -> settings.json
etc...
(each shortcut would open/bring to focus that file in the editor)
So far I haven't found a solution, I have to dig further but I wonder if there's already an obvious solution for this, perhaps some plugin otherwise what would be the the simplest approach?
You can do this with keybindings like this:
{
"key": "alt+1",
"command": "workbench.action.terminal.sendSequence",
"args": { "text": "code -r 'test.js'\u000d" }
},
{
"key": "alt+2", // open workspace settings
"command": "workbench.action.terminal.sendSequence",
"args": { "text": "code -r '.vscode/settings.json'\u000d" }
},
You can use the variables listed in https://code.visualstudio.com/docs/editor/variables-reference , like ${workspaceFolder}
or ${execPath}
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.