简体   繁体   English

VSCode - 选项卡图标颜色反映 git 状态

[英]VSCode - tab icon color reflect git status

I really like that VSCode colors the file name in the sidebar depending on the git status (green for new, yellowish for modified).我真的很喜欢 VSCode colors 侧栏中的文件名,具体取决于 git 状态(绿色表示新,黄色表示修改)。 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?有没有办法让标签使用与侧边栏相同的 colors? Additionally, are the colors configurable for the different git states?此外,colors 是否可针对不同的 git 状态进行配置?

在此处输入图像描述

Dec 2020: This is not likely, because there are a lot of issues/plugins already around tabs colors for VSCode (like issues/31308 ) 2020 年 12 月:这不太可能,因为 VSCode 的选项卡 colors 周围已经存在很多问题/插件(如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 ).这意味着您可能想要的任何文本颜色都可能与设置或插件(如ColorTabs )强加的前景/背景选项卡 colors 发生冲突(可读性较差)。

That is why custom text colors are better represented in the sidebar rather than the tabs themselves.这就是为什么自定义文本colors 在侧边栏中比选项卡本身更好地表示。


Update VSCode 1.53 Jan. 2021: as described with Mark 's answer , this is implemented in term of tab decoration: 2021 年 1 月更新 VSCode 1.53:如Mark回答所述,这是在标签装饰方面实现的:

Tab decorations 标签装饰

Two new settings allow you to configure whether editor tabs show decorations, such as git status or diagnostics.两个新设置允许您配置编辑器选项卡是否显示装饰,例如git status或诊断。

  • Use workbench.editor.decorations.colors to decorate tabs with colors, like red/green for files with errors and warnings, and使用workbench.editor.decorations.colors来装饰带有 colors 的选项卡,如带有错误和警告的文件的红色/绿色,以及
  • use workbench.editor.decorations.badges to decorate tabs with badges, like M for git modified.使用workbench.editor.decorations.badges来装饰带有徽章的标签,例如修改了 git 的 M。

带有装饰的编辑器选项卡

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM