Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Code - Group pending changes by folder

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?

like image 286
DJAlPee Avatar asked Jul 23 '18 09:07

DJAlPee


People also ask

How do I get rid of pending changes in VS Code?

To undo a few of your pending changes To undo all changes you have made in your solution or a code project, open the context menu, and then choose Undo Pending Change. In the Undo Pending Changes dialog box, make sure the changes you want to undo are selected, and then choose Undo Changes.

How do I view pending changes in Visual Studio?

On the View menu, click Other Windows, and then click Pending Changes. The Pending Changes window is displayed. In the Pending Changes window, right-click the element that you want to compare to another version, click Compare and then click, With Workspace Version or With Latest Version.

How do I change the directory in VS Code?

The File > Add Folder to Workspace command brings up an Open Folder dialog to select the new folder. Once a root folder is added, the Explorer will show the new folder as a root in the File Explorer. You can right-click on any of the root folders and use the context menu to add or remove folders.


1 Answers

I see these interface changes in the Insiders Build 1.47:

scm tree/list views

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:

source control tree view

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.

Toggle SCM View mode button

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.

scm tree view actions

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.

like image 131
Mark Avatar answered Sep 20 '22 23:09

Mark