Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.8k views
in Technique[技术] by (71.8m points)

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

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...