问题
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.
回答1:
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.colorsto decorate tabs with colors, like red/green for files with errors and warnings, and useworkbench.editor.decorations.badgesto decorate tabs with badges, likeMfor git modified.
These are NOT enabled by default.
The colorCustomizations gitDecoration....
"workbench.colorCustomizations": {
"gitDecoration.modifiedResourceForeground": "#ff0000",
}
work to change BOTH the Explorer view and tab colors.
来源:https://stackoverflow.com/questions/58377383/vscode-how-to-highlight-editor-tabs-that-were-modified-since-last-git-commit-s