Tabs Studio Blog (organizing Visual Studio document tabs)

October 25, 2019

Integrated vertical tabs

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

Visual Studio 2019 16.4 Preview 2 adds the vertical tabs layout option to the core product:

Tabs Studio continues to work as usual if you keep the tab layout option set to the default Top value, but I’d like to use this opportunity to improve vertical tabs usage experience. More specifically, when vertical tabs are activated in VS 2019, Tabs Studio reuses this area to show tabs, instead of showing them in a separate tool window:

If you want to try it yourself, install Visual Studio Preview.

Enable vertical tabs in Visual Studio options:

And install Tabs Studio v4.6.2.

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:

April 18, 2019

Customizing TrackEd colors

Filed under: Uncategorized — Tags: — Sergey Vlasov @ 9:56 am

TrackEd add-in shows a yellow or green bar in the tab title for modified and saved documents:

You can customize these colors first by applying the following Tabs style (copied from TrackEd source):

<Style TargetType="TabsStudio:TabNameModificationMarker" BasedOn="{StaticResource DefaultTabNameModificationMarkerStyle}">
<Setter Property="Template">
  <Setter.Value>
    <ControlTemplate TargetType="{x:Type TabsStudio:TabNameModificationMarker}">
      <TextBlock Name="TabNameModificationMarkerTextBlock" Padding="0" Margin="3,2,0,2"  Text=" "/>
      <ControlTemplate.Triggers>
        <DataTrigger Binding="{Binding Path=(TabsStudioTrackEd:Properties.DocStatus),
                 RelativeSource={RelativeSource AncestorType=TabsStudio:TabNameGroup}}" Value="Dirty">
          <Setter TargetName="TabNameModificationMarkerTextBlock" Property="TextBlock.Background" Value="#E5AC00"/>
          <Setter Property="Visibility" Value="Visible"/>
        </DataTrigger>
        <DataTrigger Binding="{Binding Path=(TabsStudioTrackEd:Properties.DocStatus),
                 RelativeSource={RelativeSource AncestorType=TabsStudio:TabNameGroup}}" Value="Saved">
          <Setter TargetName="TabNameModificationMarkerTextBlock" Property="TextBlock.Background" Value="#009900"/>
          <Setter Property="Visibility" Value="Visible"/>
        </DataTrigger>
      </ControlTemplate.Triggers>
    </ControlTemplate>
  </Setter.Value>
</Setter>
</Style>

<Style TargetType="TabsStudio:TabExtensionModificationMarker" BasedOn="{StaticResource DefaultTabExtensionModificationMarkerStyle}">
<Setter Property="Template">
  <Setter.Value>
    <ControlTemplate TargetType="{x:Type TabsStudio:TabExtensionModificationMarker}">
      <TextBlock Name="TabExtensionModificationMarkerTextBlock" Padding="0" Margin="0,2,0,2"  Text=" "/>
      <ControlTemplate.Triggers>
        <DataTrigger Binding="{Binding Path=(TabsStudioTrackEd:Properties.DocStatus),
                 RelativeSource={RelativeSource AncestorType=TabsStudio:TabExtensionGroup}}" Value="Dirty">
          <Setter TargetName="TabExtensionModificationMarkerTextBlock" Property="TextBlock.Background" Value="#E5AC00"/>
          <Setter Property="Visibility" Value="Visible"/>
        </DataTrigger>
        <DataTrigger Binding="{Binding Path=(TabsStudioTrackEd:Properties.DocStatus),
                 RelativeSource={RelativeSource AncestorType=TabsStudio:TabExtensionGroup}}" Value="Saved">
          <Setter TargetName="TabExtensionModificationMarkerTextBlock" Property="TextBlock.Background" Value="#009900"/>
          <Setter Property="Visibility" Value="Visible"/>
        </DataTrigger>
      </ControlTemplate.Triggers>
    </ControlTemplate>
  </Setter.Value>
</Setter>
</Style>

And then change colors for the name and extension to your values. For example, after changing default #E5AC00 Dirty color to #D90000 it looks like this:

April 10, 2019

Tab coloring rules generator

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

The Tab coloring rule dialog lets you conveniently define background and foreground colors for a tab matching specific criteria:

The same rule can be also defined as an XAML Tabs style:

<Style TargetType="TabsStudio:Tab" BasedOn="{StaticResource DefaultTabStyle}">
    <Style.Triggers>
        <MultiDataTrigger>
            <MultiDataTrigger.Conditions>
                <Condition Binding="{Binding Path=Paths, RelativeSource={RelativeSource Self}, 
                		Converter={StaticResource RegexMatch},ConverterParameter='WpfApp1'}" Value="True"/>
                <Condition Binding="{Binding Path=IsTabSelected, RelativeSource={RelativeSource Self}}" Value="True"/>
            </MultiDataTrigger.Conditions>
            <Setter Property="Background">
                <Setter.Value>
                     <LinearGradientBrush StartPoint="0,0" EndPoint="0,1"> <GradientStop Color="#e87400" Offset="0"/> <GradientStop Color="#0089E1" Offset="1"/> </LinearGradientBrush>
                </Setter.Value>
            </Setter>  
            <Setter Property="Foreground">
                <Setter.Value>
                     <SolidColorBrush Color="White"/>
                </Setter.Value>
            </Setter>  
        </MultiDataTrigger>
    </Style.Triggers>
</Style>

If you have many similar tab coloring rules, instead of using the Tab coloring rule dialog you may consider generating an XAML style programmatically and then copy it to Tabs Studio.

TStyle.zip is a sample project for Visual Studio 2019 using a T4 Text Template that generates 3 styles for a project tab, selected project tab and previously selected project tab given a project path and a base background color. If you want to define these styles for multiple projects, in the tab.tt file just add a path-color pair to the dictionary, save the file and copy generated tab.txt file contents as Tabs style:

<# var rules = new Dictionary<string, string> { {"WebApplication1", "#800000"}, {"WpfApp1", "#e87400"} }; #>

February 6, 2019

Visual Studio 2019 inactive tab text

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

Visual Studio 2019 Preview 2.2 includes an updated blue theme that makes inactive tab text in Tabs Studio invisible:

One workaround to fix it is applying the following Tabs style:

<Style TargetType="TabsStudio:Tab" BasedOn="{StaticResource DefaultTabStyle}">
  <Style.Triggers>
    <MultiTrigger>
      <MultiTrigger.Conditions>
        <Condition Property="IsGroupFocused" Value="False"/>
        <Condition Property="IsTabSelected"  Value="True"/>
      </MultiTrigger.Conditions>
      <Setter Property="Foreground" Value="{DynamicResource {x:Static vs_shell:EnvironmentColors.FileTabInactiveTextBrushKey}}"/>
    </MultiTrigger>
  </Style.Triggers>
</Style>

The fix will be included in the next Tabs Studio release.

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.

September 26, 2018

Keeping tabs order better

Filed under: Uncategorized — Sergey Vlasov @ 9:41 am

I’ve created a new add-in OrderKeeper that remembers a tab position when it is closed and restores the position when the tab is reopened. It should address the problem with tabs reordering when a project is externally modified by updating from source control or switching branches. You may also find stable tab position useful when you manually close and reopen a tab.

Download link: OrderKeeper v1.0.0.

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.

October 2, 2017

Grouping tabs by subject

Filed under: Uncategorized — Sergey Vlasov @ 2:01 pm

Automatic tab grouping is essential for efficient organization of document tabs in Visual Studio. Tabs Studio by default automatically groups tabs with different extensions and the same name:

Additionally, you can set up automatic coloring, sorting and grouping of tabs based on tab name, project or document path. For example, let’s explore different options to organize tabs with the word Client: ClientHouse.cs, ClientPayments.cs and BusinessClient.cs.

To color all client tabs with a slightly transparent green color, you can create a tab coloring rule with Tab name regex=Client and Background=<SolidColorBrush Color=”#7D8FBC8F”/>:

To position client tabs near each other, enable the Sorter add-in, delete the default Sort by tab name rule and add a new sorting rule with Rule type=TabName and Match regex=(?<M>Client). Checking the Create super group option will additionally visually separate the group with a margin (configured in the Tabs style):

Finally, if you want to group client tabs in one extended tab, Title grouping regex=(?<Name>Client)(?<Ext>.+)|(?<Name>(.*[/\\])?.+?)(?<Ext>\..+) will group ClientHouse.cs and ClientPayments.cs:

You can add BusinessClient.cs to this group as well, but it depends on how you want to display it. For example, the following variations are possible:

1. Set Title grouping regex=(?<Ext>.*)(?<Name>Client)(?<Ext>.+)|(?<Name> (.*[/\\])?.+?)(?<Ext>\..+)

2. Install and enable the ITransform add-in.

3. In ITransform add-in options set Interface regex=^(?<Prefix>.+)(?<Name>Client)(?<Ext>.+)$

4. In ITransform add-in options set Replacement regex to ${Prefix} or ${Prefix}${Ext} or ${Prefix}${Name}${Ext} corresponding to the variations listed above.

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.

Older Posts »

Blog at WordPress.com.