Tabs Studio Blog (organizing Visual Studio document tabs)

March 15, 2022

Highlighting tabs for the selected project

Filed under: Uncategorized — Tags: , — Sergey Vlasov @ 11:11 pm

I’ve created the new Selector add-in that dynamically highlights tabs belonging to the same project as the selected tab.

For example, when the selected tab is from the BlazorApp1 project:

And when the selected tab is from the WpfApp1 project:

A sample tabs style setting transparent red background color for selected project tabs excluding the selected tab:

<Style TargetType="TabsStudio:Tab" BasedOn="{StaticResource DefaultTabStyle}">
              <Condition Binding="{Binding Path=(TabsStudioSelector:Properties.IsSelectedProject), RelativeSource={RelativeSource Self}}" Value="True" />
              <Condition Binding="{Binding Path=IsTabSelected, RelativeSource={RelativeSource Self}}" Value="False"/>
            <Setter Property="Background" Value="#50FF0000" />

Download link: Selector v1.0.0.

May 24, 2020

Full path disambiguation

Filed under: Uncategorized — Tags: — Sergey Vlasov @ 11:36 am

The Disambiguator add-in detects when two or more tabs have the same title and adds Visual Studio folder or project to titles for these tabs:

Notice how for WindowsProject1.h and WindowsProject1.cpp tabs it added corresponding VS folder names Header Files and Source Files and for Resource.h tabs it added corresponding project names WindowsProject2 and WindowsProject1.

Disambiguator v1.0.6 shipped with Tabs Studio v4.8.0 also had some limitations. For MainWindow.xaml.cs and MainWindow.xaml tabs that are in the same directory, folder and project it still unnecessarily adds the project name WpfApp1, and for Class1.cs tabs that are in the NewFolder1/111/Class1.cs and NewFolder2/111/Class1.cs folders it adds only the closest folder name 111.

I’ve extended Disambiguator to compare full document paths when previously demonstrated disambiguation doesn’t provide enough info:

Notice that now the project name is not added to MainWindow.xaml.cs and MainWindow.xaml tabs as they can’t be disambiguated anyway, and two levels of directory names NewFolder1/111 and NewFolder2/111 are added to Class1.cs tabs to make them unique.

Download link: Disambiguator v1.1.0.

May 10, 2019

Controlled opening of corresponding files

Filed under: Uncategorized — Tags: — Sergey Vlasov @ 5:09 pm

You can quickly open a corresponding file from the tab context menu:

But some system and autogenerated files don’t need to be open manually:

You can remove them from the context menu adding the defining pattern without a capturing group to the Title grouping regex option:

In some configurations there are could be just too many corresponding files, making the context menu hard to use:

For this scenario I’ve created the NoMoreOpen add-in that removes corresponding file items from the context menu if there are more than 5 of them:

January 18, 2019

Showing tab numbers

Filed under: Uncategorized — Tags: — Sergey Vlasov @ 12:55 pm

If you are using NavigateToTabXX commands to quickly switch tabs in Tabs Studio using keyboard, you may find the new Show tab numbers option very useful:

Download link: Navigator v1.1.8.

March 14, 2018

Super group label

Filed under: Uncategorized — Tags: — Sergey Vlasov @ 11:22 pm

When grouping tabs by project (with the Sorter add-in), it could be helpful to actually see the corresponding project name for each tab group. I’ve created the new SuperName add-in that adds the corresponding project name to the first tab in each super group:

Download link: SuperName v1.0.0.

June 16, 2017

Super commands for super groups

Filed under: Uncategorized — Tags: — Sergey Vlasov @ 10:06 am

I’ve created the new SuperCommands add-in that adds two tab context menu commands Close super group and Close all but this super group:

If you use super groups, please, have a look.

Download link: SuperCommands v1.0.0.

February 1, 2016

Tracking changed files

Filed under: Uncategorized — Tags: — Sergey Vlasov @ 1:18 pm

The Visual Studio editor tracks changed lines and displays them on the selection margin: yellow – changes since the last save, green – saved changes since file opening, orange – reversed changes (undo) after a save operation. I think it can be useful to indicate changed files in the tab title as well. An orange bar instead of the default asterisk for files changed since the last save (orange looks better than yellow in the tab title), plus a green bar for saved files:

Changed file indicators in tab titles

Changed file indicators in tab titles

I’ve implemented it as the TrackEd add-in for Tabs Studio. These indicators should visually separate tabs you edited and other tabs used only for viewing. Give it a try and share your experience!

Download link: TrackEd v1.0. (Don’t forget to unblock the TrackEd.dll file after downloading from file properties.)

P.S. To clear tracking changes and the title indicator for a saved file, you can use this command for Visual Commander. (It works independently of Tabs Studio.)

March 11, 2014

Add an SQL query description to the SSMS tab name with the SQLComment add-in

Filed under: Uncategorized — Tags: , — Sergey Vlasov @ 9:35 pm

Many automatically opened SQL tabs in SQL Server Management Studio have names like SQLQuery1.sql, SQLQuery2.sql etc:

SQLQuery tabs in SSMS 2012

SQLQuery tabs in SSMS 2012

To better distinguish such tabs I’ve created the SQLComment add-in that can add a comment from the query body to the tab name:

Tabs with comments in SSMS 2012

Tabs with comments in SSMS 2012

You can chose any comment format and configure SQLComment to extract it using a .NET regular expression. For example, the default regex
StoredProcedure \[dbo\]\.\[(?<M>\w+)\] extracts the procedure name (AddEvent) to the M named group from the following code:

USE [ReportServer]
/****** Object:  StoredProcedure [dbo].[AddEvent]    Script Date: 3/11/2014 8:29:10 AM ******/

SQLComment options

SQLComment options

To extract description from a comment like ––– provides details on investors you can use the regex ^––– (?<M>.+)$. To support several formats you can combine regexes with ‘|’ like ^––– (?<M>.+)$|StoredProcedure \[dbo\]\.\[(?<M>\w+)\]. You can use several separate M groups (line Name and Ext in standard tab grouping), the resulting string will be concatenated from all captures. Only tabs starting with SQLQueryNN.sql are considered for commenting.

Download link: SQLComment v1.0.0.

Update (March 20): Added commenting support for grouped tabs SQLComment v1.0.1.

Update (October 23): Added the “Set SQL comment…” tab context menu command for temporary comments. Added more customization for displaying comments. SQLComment v1.0.4.

August 27, 2013

Solution settings directory

Filed under: Uncategorized — Tags: — Sergey Vlasov @ 11:02 am

Saver and Marker add-ins need to save tabs order and highlighted tabs when you exit Visual Studio to restore them when you open the solution next time. This per-solution information is stored in .tss and .marker.tss files in directories along with your solution .sln files:

Marker and Saver per-solution files

Marker and Saver per-solution files

I’ve added an option to store all per-solution files in the one common directory. You need to create this directory and create the HKEY_CURRENT_USER\Software\Sergey Vlasov\Tabs Studio\SolutionSettingsDir registry value defining the directory for Tabs Studio add-ins:

SolutionSettingsDir registry setting

SolutionSettingsDir registry setting

New per-solution settings will be stored in this directory with different file names for different solutions:

Saver and Marker files in the common solution settings directory

Saver and Marker files in the common solution settings directory

June 26, 2013

Prefix tab grouping with ITransform

Filed under: Uncategorized — Tags: — Sergey Vlasov @ 2:37 pm

It is common to have concepts like User and Admin with multiple classes around them like UserManager, UserRepository and AdminManager, AdminRepository. With prefixes I, Test and suffixes Manager, Repository we end up with the following tabs:

Multiple tabs in Visual Studio 2012

Multiple tabs in Visual Studio 2012

Normally tabs are not nicely sorted by concept like on the picture above and you may want to automatically group related tabs in a larger tab. It is easy to group by suffix – just add common suffix names to the extension part in the Title grouping regex:

Suffix grouping options

Suffix grouping options

Tabs with suffix grouping

Tabs with suffix grouping

Grouping by prefix is also easy – add common prefix names to the front of the Title grouping regex:
Unfortunately, prefix names are now not displayed (because only Name and Ext groups are displayed by default):

Prefix grouping with truncated names

Prefix grouping with truncated names

This is when the ITransform add-in helps. It renames truncated names back to normal. In the latest v1.0.3 you can even customize how prefix information should be displayed:

ITransform Options

ITransform Options

Prefix grouping with ITransform

Prefix grouping with ITransform

Note that the Interface regex should match only tabs with our prefixes – the Prefix group is not optional comparing to the Title grouping regex. The Replacement regex can be for example only ${Prefix} or include your custom text.

Download link: ITransform v1.0.3

Older Posts »

Blog at