Skip to content

Is there a way to open a certain file using key bindings? #8420

Answered by jennybc
howardbaik asked this question in Q&A
Discussion options

You must be logged in to vote

Perhaps it's a bit gross, but you could open it with R code, e.g. base::file.edit(). Something like:

{
    "key": "ctrl+shift+s",
    "command": "workbench.action.executeCode.console",
    "when": "editorTextFocus",
    "args": {
        "langId": "r",
        "code": "file.edit(\"foo\")",
        "focus": true
    }
}

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@howardbaik
Comment options

@jennybc
Comment options

jennybc Jul 7, 2025
Collaborator

Answer selected by howardbaik
@jennybc
Comment options

jennybc Jul 7, 2025
Collaborator

@howardbaik
Comment options

@jennybc
Comment options

jennybc Jul 7, 2025
Collaborator

@howardbaik
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants