VSCode: how to highlight editor tabs that were modified since last git commit, show git status

无人久伴 提交于 2021-02-07 11:51:29

问题


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.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.

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!