Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VSCode - tab icon color reflect git status

Tags:

I really like that VSCode colors the file name in the sidebar depending on the git status (green for new, yellowish for modified). What I don't like is the file names for the tabs don't also reflect that. Is there a way to make the tabs use the same colors as the sidebar? Additionally, are the colors configurable for the different git states?

enter image description here

like image 729
jas7457 Avatar asked Dec 03 '20 01:12

jas7457


People also ask

How do I change my tab settings in VS Code?

To modify user settings, you'll use the Settings editor to review and change VS Code settings. To open the Settings editor, use the following VS Code menu command: On Windows/Linux - File > Preferences > Settings. On macOS - Code > Preferences > Settings.

What does green u mean in VS Code?

'U' stands for untracked file, meaning a file that is new or changed but has not yet been added to the repository.


1 Answers

Dec 2020: This is not likely, because there are a lot of issues/plugins already around tabs colors for VSCode (like issues/31308)

That means any text color you might want would likely clash (be less readable) with the foreground/background tab colors imposed by a setting or a plugin (like ColorTabs).

That is why custom text colors are better represented in the sidebar rather than the tabs themselves.


Update VSCode 1.53 Jan. 2021: as described with Mark's answer, this is implemented in term of tab decoration:

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.

Editor Tab with decorations

like image 171
VonC Avatar answered Sep 30 '22 19:09

VonC