Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VSCode: enable or disable editor tabs modified since last git commit, show git status with modified tabs colors

Tags:

In VSCODE, how can I highlight tabs that were modified compared to previous git commit? In order to show their git status.

Note: This is not a duplicate of How can I edit VS Code settings so that the tabs of modified files are highlighted?, since that question relates to unsaved changes, and this question relates to saved changes that were modified compared to the recent git commit.

like image 267
Yuval Atzmon Avatar asked Oct 14 '19 12:10

Yuval Atzmon


People also ask

How do I see commitment changes in Vscode?

When you have repository open in Visual Studio code, you can execute the command Git: View History (git log) from the command Plate. This will open the Git History Window with all change logs for the repository. You can then select individual commits for detailed change logs for each of them.

How do I change Vscode tab?

When using Visual Studio Code on Windows, you can use CTRL + PAGE_UP to switch to the previous tab, and CTRL + PAGE_DN to switch to the next tab. You also have the ability to switch to tabs based on their (non-zero relative) index. You can do so, by pressing and holding ALT , followed by a number (1 through 9).


1 Answers

v1.53 has added this functionality, see Release notes: tab decorations.

Two new settings allow you to configure whether editor tabs show decorations, such as git status or diagnostics. Use workbench.editor.decorations.colors to decorate tabs with colors, like red/green for files with errors and warnings, and use workbench.editor.decorations.badges to decorate tabs with badges, like M for git modified.

Previously : [These are not enabled by default.]

Edit : Note that these are scheduled to be turned on by default as of v1.55. so if you want to turn this feature off, disable

workbench.editor.decorations.colors
workbench.editor.decorations.badges

or these settings in the UI

Workbench > Editor > Decorations: Colors
Workbench > Editor > Decorations: Badges

tab decorations demo

The colorCustomizations gitDecoration....

"workbench.colorCustomizations": {      "gitDecoration.modifiedResourceForeground": "#ff0000", } 

work to change BOTH the Explorer view and tab colors.

like image 185
Mark Avatar answered Sep 18 '22 13:09

Mark