Tabs Studio Blog (organizing Visual Studio document tabs)

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:
(?<Prefix>I|Test)?(?<Name>.+?)(?<Ext>(Manager|Repository)?\..+)
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

Blog at WordPress.com.