kdcro101 / vscode-favorites

Add files and directories to workspace favorites. You can create groups (and subgroups) of favorite items with files and folders. Time saver for complex projects.
MIT License
49 stars 13 forks source link

Favorites

Visual Studio Marketplace Installs Rating

Add files and directories to workspace favorites. You can create groups (and subgroups) of favorite items with files and folders. Time saver for complex projects.

Features

Adding to favorites

Using Favorites explorer

you can turn off subview in File explorer by clicking on its header and deselecting it.

Install

Open Visual Studio Code press CTRL+p and type or copy and paste:

ext install kdcro101.favorites

Configuration

favorites.useWorkspace : number - default is 0

favorites.useFilesExclude : boolean

favorites.storageFilePath : string

favorites.storageRegistry : string[]

favorites.groupsFirst : boolean

favorites.sortDirection : string, ASC or DESC

favorites.useTrash: boolean (default false)

favorites.includeInDocumentBodyContextMenu : boolean (default false)

favorites.includeInEditorTabContextMenu : boolean (default true)

Keyboard browsing

You can browse favorites using keyboard only by executing command Favorites: Browse command from palette. Assign keyboard shortcut if needed.

Usage

Adding to favorites

Right-click item in File explorer, an open file tab, or the background of an open editor and select Add to favorites.

Adding to favorites group or subgroup

Right-click item in File explorer, an open file tab, or the background of an open editor and select Add to favorites group, then select group from list.

Removing from favorites

Right-click item in Favorites view and select Remove from favorites

Create favorites group

Right-click on empty area and select Create group

Create favorites subgroup

Right-click on group item and choose Create group

Delete favorites group

Right-click group item in Favorites view and select Remove group

Remove everything from favorites

Click on trash bin icon on Favorites view title, type "yes" to confirm

Multiple sets

You can have multiple sets of favorites per workspace. This allows you to build independent set of favorites, depending on context. To achieve this you need to setup storage registry.

Add favorites.storageRegistry to your workspace settings, for example:

// paths are relative to workspace
 "favorites.storageRegistry": [
            "favorites/system.json",
            "favorites/classes.json",
            "favorites/services.json",
],

Select active storage file from registry by clicking status bar element select or by executing command Favorites: Select alternative storage from registry from command palette and then selecting item from list:

list

All add favorite operations will be written in currently selected storage file.

LICENSE

GPL v3 License