Is it possible to change the default behavior in VSCode so that when I'm in the Source control window and I click on a file in the left pane, the file opens in the right pane instead of the changes window? I see that if I right click a file I can choose to open it instead of the changes window but I'm lazy and just want to click once.
1 Answer
There is an icon which will let you open file itself without needing to right click:
It is also possible to change default behavior when left-clicking on the file name since version 1.30:
To change it, set in your settings.json
:
"git.openDiffOnClick": false
If you set it, the logic will inverse. Now, clicking on a file name will open the file, and clicking on the "inline icon" will open the diff.
It is also possible to disable this inline icon completely with:
"git.showInlineOpenFileAction": false
-
4Is it possible to Open FIle from source control like Ctrl-clicking on it or so while still openning Diff on simple click? Or maybe set a shortcut for it like Ctrl+Shift+G + Ctrl+O?– kolyasegCommented Jul 4, 2023 at 12:59
-
1
-
1@kolyaseg It's possible to create a key binding to open the file from the diff. To add the shortcut, go to Cog > Keyboard Shortcuts and filter on
git.openFile
. Alternatively, you can manually add something like this tokeybindings.json
:[ { "key": "alt+z", "command": "git.openFile" } ]
. The other way around (from regular view to diff view) is also possible usinggit.openChange
.– qadzekCommented Mar 6 at 10:18