Reputation: 591
Let's say I've clicked on a file in the Git changes view and it opened a diff. I realize I can (usually) edit that file on the right side of the diff.
Is there a command that will open the right hand (local) file in it's own editor, as if I had clicked on it in the Explorer?
Upvotes: 17
Views: 3590
Reputation: 392
In my case I had set workbench.editor.editorActionsLocation
settings to 'hidden'.
Reverted it to the default fixed it.
"workbench.editor.editorActionsLocation": "default"
Upvotes: 1
Reputation: 413
The command is git.openFile
. You can add a custom keybinding, for example to f4
:
{
"key": "f4",
"command": "git.openFile",
"when": "isInDiffEditor"
}
Upvotes: 15
Reputation: 181359
It appears what you want is the new command workbench.action.compareEditor.openSide
currently in the Insiders' Build v1.74.
If the right-hand side of the diff has focus then triggering that command will close the diff and open the right-hand side in its editor. And similarly if the left-hand side had focus.
Upvotes: 1
Reputation: 7780
Do you consider the Open File icon to the right of the file name a command? I'm not familiar with any other way to do it.
Upvotes: 7