Color and name tabs automatically by server / db #35
Replies: 3 comments 6 replies
-
|
To be clear, in my example, these tabs show the name of the server_database_uniqueString because all of these tabs are new queries that have not yet been saved manually. In base SSMS these would typically appear as SQLQuery1.sql, SQLQuery2.sql, and so on. If you open a saved file I would expect the name of the saved file to appear in the tab name (not the name of the connection). |
Beta Was this translation helpful? Give feedback.
-
|
Any intentions on adding this? |
Beta Was this translation helpful? Give feedback.
-
|
@Blake-goofy One thing I would consider doing differently is how the color is selected. Instead of relying on document properties, I think it would be more flexible to base it on the active connection information. Many environments depend heavily on target server characteristics, and tying the logic to the connection would make this more adaptable. A few example use cases where this could help:
Using the connection context would make these scenarios easier to support and extend in the future. Do you want to take a stab at it? I would be happy to review and accept a PR with this change :). |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I often work between servers and databases and SSMS really only allows the bar at the bottom of the window to be set to a color reflecting the active connection which is not helpful when I want to know which tabs are associated with which connections before I click on them.
I would love to be a able to configure auto tab coloring and naming by server or server+database for easy identification.

I have an janky, external app that allows you to configure colors using the built in SSMS tab coloring system with the "Color document tabs by regular expression" setting. It works by sending keystrokes to the app to save the file with the name of the active connection in the directory, and then sending more keystrokes to set the tab color.

If anyone is curious: https://github.com/Blake-goofy/SSMS-Plus
If this is something you could add to this extension, I'm sure it would be a lot cleaner than my solution. Thanks for the work you do!
Beta Was this translation helpful? Give feedback.
All reactions