VS Code 可以在 git 版本管理器中按文件夹显示修改后的文件吗?

Can VS Code display modified files by folder in git version manager?

看截图:

vscode列出所有修改过的文件,并显示文件属于哪个文件夹,但是不够清楚,我希望修改后的文件按文件夹显示,就像在文件树中一样。可能吗?

你还不能这样做。

有一个 open issue 要求对 Git 选项卡进行一些改进,其中一条评论要求 "Sort by folder"。

您应该对该问题投赞成票,使其更容易被 VS Code 团队看到。

看来 issue 40712 "SCM: Support sort" ( by alefragnani) 可能最终(对于 VSCode 1.47,2020 年 6 月)得到解决。

参见 PR 99768 "View/Sort feature for SCM viewlet",其中建议:

  • 按状态排序
  • 按路径排序

参见View sort

View and Sort

We have added support for sorting your changes in the source control view by name, path (default), and state when using the list view option.
We have consolidated the view options (list vs. tree) and sort options into a new View & Sort menu item in the context menu.


在 VSCode 1.64(2022 年 1 月)中,此排序顺序将保持不变。

issue 120271 / PR 123232 and commit 9152469

  • 添加 scm 视图默认排序设置。
  • 将 scm 视图排序添加到工作区存储。

选项是:

  • 按路径对存储库更改进行排序
  • 按文件名对存储库更改排序
  • 按 SCM 状态对存储库更改进行排序