![]() |
|
![]() |
Order | ![]() |
Download | ![]() |
Documentation | ![]() |
Blog* | ![]() |
Support | ![]() |
![]() |
Feature Overview | ![]() |
User Guide | ![]() |
Style | ![]() |
Tab Grouping | ![]() |
Add-ins | ![]() |
Each tab title is matched with Title grouping regex. Tabs that have exactly the same Group name are grouped together. Group names comparison is case sensitive until the Group titles ignoring case differences option is turned on. Default Title grouping regex (?<Name>(.*[/\\])?.+?)(?<Ext>\..+) matches the Name group as all symbols before the first dot after a path and matches the Ext group as the dot and all subsequent symbols. For example, tabs with titles Class1.cs, Class1.xaml and Class1.xaml.cs have the same Name Class1 and are grouped together.
Default Title grouping regex for SSMS is (?<Ext>.+?) - (?<Name>not connected)$|(?<Ext>.+?) - (?<Name>.+?) \(.+\)$|(?<Name>.+?) - (?<Ext>.+)Customizing grouping regex allows different grouping options. Let's see some examples:
![]() |
| (?<Name>(.*[/\\])?.+?)(?<Ext>\..+) |
Only tabs with xaml and xaml.cs extensions are grouped.
![]() |
| (?<Name>.+?)(?<Ext>\.(xaml|xaml.cs))$ |
Titles with the same prefix and ended with _c.h or _i.h are grouped together along with default grouping by tab name.
![]() |
| (?<Name>.+?)(?<Ext>(_i\.h|_c\.h))$|(?<Name>.+?)(?<Ext>\..+) |
A tab with the cs extension is not grouped with other tabs.
![]() |
| [^.]+\.(cs)$|(?<Name>.+?)(?<Ext>\..+) |
Tabs with the xaml extension are grouped together along with default grouping by tab name.
![]() |
| (?<Ext>.+?)(?<Name>\.xaml)$|(?<Name>.+?)(?<Ext>\..+) |
![]() |
| (?<Name>.+?)\.(?<Ext>.+) |
Tabs with the Window prefix are grouped together along with default grouping by tab name.
![]() |
| (?<Name>Window)(?<Ext>.+?\..+)|(?<Name>.+?)(?<Ext>\..+) |
By default tabs are grouped only if their associated Visual Studio documents are in the same folder. This is a good default as you don't want Window1.xaml from Project1 to be grouped with Window1.xaml.cs from Project2. But sometimes files that are really relevant can reside in different folders. For example, it would be nice to group default.js from the Scripts folder with default.htm from the HTML folder. It can be set up in Path Grouping settings.
Having two files c:\src\Window1.xaml and c:\src\Window1.xaml.cs matching algorithm removes common path from two files, appends '$' symbol to the end of both files and concatenates them. Resulting Window1.xaml$Window1.xaml.cs$ string is matched with Path grouping regex. If M named group matches the string then two files are combinable. If not, two full paths with two '$' symbols are concatenated (resulting in c:\src\Window1.xaml$c:\src\Window1.xaml.cs$ string) and again matched with Path grouping regex. If M named group matches the string then two files are combinable. If not, then files are not combinable.
If file paths are combinable then additional tab title grouping rules are checked. Two paths are lexicographically "sorted", it is guaranteed that concatenation is Project1\Window1.xaml$Project2\Window1.xaml.cs$ and not Project2\Window1.xaml.cs$Project1\Window1.xaml$.
Default Path grouping regex (?<M>^[^\\]+$) checks that there are no back slashes in first paths concatenation and thus allows files only from the same directory. If we try c:\Project1\Window1.xaml and c:\Project2\Window1.xaml.cs files, then first concatenation would be Project1\Window1.xaml$Project2\Window1.xaml.cs$ - it has two back slashes and would not match default regex.
Allow HTML\1033\*.htm files to be combinable with Scripts\1033\*.js files:
(?<M>^HTML.+?htm\$Scripts.+?js\$)|(?<M>^[^\\]+$)Allow *.htm files from any folder to be combinable with other files:
(?<M>htm\$)|(?<M>^[^\\]+$)Allow all files from the c:\Projects\4\4\HTML folder to be combinable with other files:
(?<M>c:\\Projects\\4\\4\\HTML)|(?<M>^[^\\]+$)Allow files from the subfolder to be combinable with files in upper directory (for example, c:\Projects\4\default.htm and c:\Projects\4\code\default.js):
(?<M>^[^\\]+\\[^\\]+$)|(?<M>^[^\\]+$)Deny files with .Designer.cs extension to be combinable with other files:
(.+Designer\.cs\$)|(?<M>^[^\\]+$)As Visual Studio documents from different folders can be grouped together, the TabsStudio.Connect.OpenCorrespondingFile command and the Open context menu command can also find corresponding files in other folders (other than the current folder for the active document). Opened solution is scanned for files and those files that match grouping options are displayed in context menu:
Copyright 2009 - 2010 Sergey Vlasov