Visual Studio Code - 按文件夹对挂起的更改进行分组 [英] Visual Studio Code - Group pending changes by folder

查看:97
本文介绍了Visual Studio Code - 按文件夹对挂起的更改进行分组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想摆脱我当前的 IDE (Jetbrains) 并迁移到 Visual Studio Code,因为有一些受支持的扩展.

我在 VS Code 中只缺少一件事......

如果我在源代码管理中有多个文件作为挂起的更改,它们只会显示为一个平面列表.在例如IntelliJ 可以按文件夹对挂起的更改文件进行分组.这非常有用,因为我有多个文件共享相同的文件名...

是否有扩展,我可以安装以添加此功能还是只是一个配置,我还没有找到?

解决方案

我在 Insiders Build 1.47 中看到了这些界面变化:

tree/list 选项已从外部 Source Control 标题栏中删除,现在位于省略号(三个点)下方 - 如果您选择 list:pathnamestatus.以及您正在寻找的 tree 视图.


正如@jabacchetta 预测的那样,此功能已添加到 v1.39 - 用于支持它的 scm 提供商,例如 git.请参阅

来自发行说明:

<块引用>

更新了源代码管理视图

源代码管理视图已更新为使用最新的树小部件.您现在可以使用源代码管理标题栏上的切换查看模式"按钮.

<块引用>

您可以使用 scm.defaultViewMode 设置更改默认视图,它采用值列表或树.

您现在还可以从自动键盘导航和通过简单地开始输入来过滤更新的树小部件查看.

<块引用>

在显示文件夹的树视图模式下,Git 扩展现在向文件夹提供命令,例如 Stage Changes,它将应用于文件夹内的所有文件.

I want to get rid of my current IDE (Jetbrains) and migrate to Visual Studio Code because of some supported extensions.

There is only one thing I'm missing in VS Code...

If I have multiple files in source control as pending changes, they are just shown as a flat list. In e.g. IntelliJ it is possible to group pending changes files by their folder. This is very helpful, because I have multiple files sharing the same filename...

Is there an extension, I can install to add this feature or is it just a config, I did not find, yet?

解决方案

I see these interface changes in the Insiders Build 1.47:

The tree/list option has been removed from the outer Source Control header bar and is under the ellipsis (three dots) now - with additional options if you choose list: path, name, status. As well as the tree view you were looking for.


As @jabacchetta predicted, this functionality is being added to v1.39 - for scm providers that support it, like git. See https://github.com/microsoft/vscode-docs/blob/vnext/release-notes/v1_39.md#updated-source-control-view. And see the link in @jabacchetta's answer. Tree view in source control.

As usual, you can open/close folders by clikcking on them or left/right arrows. Demo from the Insider's Build:

From the Release Notes :

Updated Source Control view

The Source Control view has been updated to use the latest tree widget. You can now toggle between a list and a tree view with the Toggle View Mode button on the Source Control title bar.

You can change the default view using the scm.defaultViewMode setting, which takes the values list or tree.

You also now benefit from the automatic keyboard navigation and filtering of the updated tree widget by simply starting to type in the view.

When in tree view mode, which displays folders, the Git extension now contributes commands to folders, for example Stage Changes, which will be applied to all files within a folder.

这篇关于Visual Studio Code - 按文件夹对挂起的更改进行分组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆