Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Open file instead of open changes by default in source control window

Tags:

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.

like image 244
Mateo Avatar asked Apr 11 '19 13:04

Mateo


People also ask

Why is Visual Studio not showing source control?

If you don't see the checkbox for adding to source control – Git or Visual Studio Team Services, you can enable this from Options settings. From the main menu, Tools -> Options and then navigate to. Under the Plug-in Selection, you will find it is already set to “None.

How do I search for a file in Source Control Explorer?

Right-Click In the File List, right-click the file you want to check in and select Source Control > Check In (for selected files) or Source Control > Project > Check In All (for all files in the project). Local Toolbar In the File List, select the file(s) you want to check in.

How do I view source control in Visual Studio?

Source Control Explorer is available in Visual Studio, but isn't opened by default when working with a project managed in TFVC. You can open the Source Control Explorer window: From the Team Explorer home page (Keyboard: Ctrl + 0, H), choose Source Control Explorer. From the menu bar.


1 Answers

There is an icon which will let you open file itself without needing to right click: enter image description here

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
like image 91
sirVir Avatar answered Sep 23 '22 07:09

sirVir