File FocusFile Focus facilitates a streamlined workflow by allowing you to reorganize mono repos or other big projects virtually. Files and folders can be grouped dynamically using glob patterns or organized manually into virtual folders best suited to your workflow. A pinned virtual folder automatically keeps track of files you are working on so you can quickly pick up where you left off when working on multiple issues/tickets. If you want to share or highlight commonly used files and folders with your team you can store a configuration file along with your source code to make groups automatically available to all people working on the project. Like this vs-code extension? Please consider subscribing to my channel and sharing the extension with your friends and colleagues. For bug reports and code contributions head on over to: Features
What is new
Getting startedFile focus affords you the ability to re-organize frequently used files and folders inside groups (focus groups). To get started with your first group:
Conceptually a group is a container of bookmarks that link to files and folders within one or more workspaces. Files and folders can be manually added to a group as your work, dynamically based on glob patterns or based on config files saved into your project. You can open files directly from a focus group. Folders added to a "focus group" can be navigated like any other folder. Tips & Tricks
File toolsThe extension provides some basic tools for creating files and folders. For all other needs use the vscodes file explorer.
Creating dynamic folders with glob patternsGlob groups are shown inside "File Focus" as folders that are automatically populated with files that match a specific glob pattern. The following example configures a folder named "Hidden Files" that automatically shows all hidden files inside workspaces but excludes any hidden files inside any "node_modules" folder as well as the .git ignore folder and any files inside .git ignore. Open the Vscode settings file and search for the property filefocus.globGroup then add the following item to the "globGroup" array:
Note:It is possible to define multiple glob groups with different patterns for each group. Simply, add more items to the globGroup array with your configuration. Also, currently, the extension uses the minimatch npm modules for globbing. Therefore, globbing works slightly differently to vscode globbing. If someone can find a way to use the same globbing as vscode that would be much better. Using project-specific focus groups.Focus groups can be made available to all users of a project by manually creating a .filefocus.json file in the root of your workspace folders. File Focus will merge the focus definition in all configuration files with the personally defined focus groups. The file focus extension does not write to this file. Therefore, any changes made to project focus groups will be lost after VS Code exits. Currently, it is required that this file be manually created and populated. The file has the following format: Example configuration file.filefocus.json This extension expects to find this file in the root of the workspace folder.
Each item of the "store" array defines a focus group. The name property of a focus group defines the name that is shown in the user interface for that group. The path array defines the resources that are shown when the group is expanded. Each path is a string that contains the relative path to the resources. NoteIt is possible to ignore groups defined by a .filefocus.json file in settings. Extension settingsUse global storageWhen enabled your manually created groups are stored inside the vscodes global storage system. If configured vscode will sync your manual groups to all your devices. By default (disabled), manually created groups are stored in your workspace allowing you to define a different set of focus groups per workspace. Toggling this option will NOT transfer groups between global and workspace storage. Sort keyChoose how resources are sorted.
Sorting by path can be handy when grouping resources from multiple projects and you want to still keep project files together. Show project groupsWhen enabled the extension looks for a ".filefocus" file in the root of every workspace folder. See the section: "Using project-specific focus groups." for more information. Add to pinned group on openWhen enabled files are automatically added to a focus group when opened in the editor. This allows automatic tracking of files you are currently working on. Show excluded files group.When enabled a dynamic group is shown that will contain all files and folders that match what has been defined inside the vscode exclude file. Enabling this option may require a restart to pick up changes. Known issues
|