Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 months ago.
Improve this question
Is it possible to set the SSMS theme to all dark? I really like the dark theme in Visual Studio and SSMS is built on top of the VS shell. I saw this SQL Server Management Studio Skin / Appearance / Layout, but it is only for the query editor.
For SSMS 2016 Open C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\ManagementStudio\ssms.pkgundef
Goto
// Remove Dark theme
[$RootKey$\Themes{1ded0138-47ce-435e-84ef-9ec1f439b749}]
and comment above settings,like this, then restart SSMS, you will sort there is a new option Dark in the Color theme option.
// Remove Dark theme
//[$RootKey$\Themes{1ded0138-47ce-435e-84ef-9ec1f439b749}]
Since SQL Server Management Studio is built inside of the Visual Studio Shell, restoring the Visual Studio Dark color theme will apply the theme to elements in SSMS that are also in Visual Studio or use Visual Studio controls:
Window body
Main menus
Query editor
Solution Explorer
etc.
The VS dark theme does not style elements that are unique to SSMS, leaving them well-lit:
Object Explorer
Messages panel
Execution plan panel
Connection dialog
etc.
The VS dark theme partially styles that are modified versions of VS controls, rendering them unattractive at best:
Results grid, where NULL values become white text on a light yellow background
Object Explorer context menus, where fly-out menus are displayed with black text on a dark grey background.
This is totally better than nothing, but really not ideal. It bothered me enough that developed a solution. Here's a screenshot:
It's an SSMS add-on that automatically sets dark mode wherever possible, overriding SSMS' controls' colors. Check it out at sqlshades.com
Here's the automated way to make it easier to enable SSMS Dark Theme in SQL Server 2014+. It's re-entrant also in case you've already executed it. It will make a backup first just in case you are concerned about recovery. Inspired by this manual guide.
PS CommandLet to Enable Dark SSMS Theme
function EnableDarkSSMSTheme() {
$ssmsConfig = "C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\ManagementStudio\ssms.pkgundef"
$fileContent = get-content $ssmsConfig
Set-Content -path ([System.IO.Path]::ChangeExtension($ssmsConfig, "backup")) -value $fileContent # backup original file
$startContext = $fileContent | Select-String "// Remove Dark theme" -context 0, 100 | Select-Object LineNumber, Line -ExpandProperty Context | select-object LineNumber, PostContext # grab start context
$endContext = $startContext.PostContext | select-string "//" | Select Line, #{Name="LineNumber";Expression={$_.LineNumber + $startContext.LineNumber - 3}} -First 1 # grab end context, offset line # for ending
for($i = $startContext.LineNumber-1; $i -le $endContext.LineNumber; $i++) { $fileContent[$i] = "//$($fileContent[$i])" } # prefix lines to comment
Set-Content -path $ssmsConfig -value $fileContent # persist changes
}
EnableDarkSSMSTheme
kill -name ssms
start-process ssms
Note: For version upgrades v17.2 to v17.3, the program file configurations get overwritten and you have to re-apply this script.
I just change my windows theme via high contrast and make some fine tune adjustments. This will get SSMS into full dark mode.
Answering this from 2022.
You can now use Azure Data Studio.
Azure Data Studio Supports Multiple Themes Including Dark Theme for SQL.
Just click the "Manage" button, gear button at the bottom left corner > then click "Color Theme".
Related
how can I modify Visual Studio 2015 to be able to search the internet (my fav search engine happens to be google) from the context menu in the code editor?
Ideally, I would like it to open as a new tab in my (default) external browser, because the internal web browser is still...lacking, shall we say?
I found one extension "web search" for older VS, but I have found no extension that works with VS 2015. I found no article that still works.
For comparison, when you're in Chrome, you can select some text, right click and say Search Google for 'what you selected'.
I think this would be handy when learning new technologies from a project that uses those technologies, or just for help.
Ok this turned out to be fairly easy. I just added a tool to Tools, External Tools
Command: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
Arguments: https://www.google.com/?gws_rd=ssl#newwindow=1&safe=active&q=%22$(CurText)%22
I enclosed the $(CurText) variable around quotes (%22) so that it would search on the exact phrase.
Then, to make it more accessible and actually put it in the context menu (and other places), I clicked the Move Up button to make it the first command, then customized the Standard toolbar to include Tools.External Command 1. I also added it to Other Context Menus | Html Context and Editor Context Menus | Code Window
Then I also went into Tools, Options, Keyboard and associated Tools.ExternalCommand1 with Alt+G
IMPORTANT: Because Visual Studio (still, in 2015) doesn't save some modifications to the IDE until it shuts down, you need to shut down all other instances of VS and then lastly shut down the instance that you used to enact these IDE modifications for them to "stick". And, if VS 2015 is like previous versions, be prepared for the menu / toolbar modifications to simply go away one day, at which point you'll just have to redo them.
I'm using the Light theme with custom Text Editor colors. In Visual Studio 2015, my Intellisense and the other lightbulb/hover/popups all have code colors to match the Text Editor settings.
That sounds nice, but the Light theme has a very light gray background, and I prefer a white foreground color for Plain Text in the editor. It ends up like this:
From my investigation so far...
In previous versions of Visual Studio, this colorized Intellisense feature came from a Productivity Power Tools add-in. It could be turned off. That's not installed. It's built into Visual Studio now, and I couldn't find a place to turn it off.
I really don't want to mess with the theme editor. I just want black text Intellisense, or to at least turn the white text to black in the popups. Others have said it doesn't work with Intellisense, but I'm not sure.
I have set Tools > Options > Environment > Fonts and Colors > Editor Tooltip > Plain Text foreground color to black. That's why the words under the code are black. But that doesn't affect the code reference itself.
I have this same issue, as I use a dark blue background with light text.
What I did was use this add-on:
https://visualstudiogallery.msdn.microsoft.com/6f4b51b6-5c6b-4a81-9cb5-f2daa560430b
Then copy the theme you are currently using, but do not switch to it yet (if you want to keep your current font / color settings).
I then exported my "Font and Color" settings, opened the generated file, and removed the "Theme" XML element completely.
You can then switch to the new copied theme and re-import your color settings from the file just created using "Import and Export Settings".
Then go to the theme editor add-on under Tools > Customize Colors. Edit your theme. Select the "Show All Elements" option and search for "tooltip" in the *.theme file. Update the Editor Tooltip -> Plain Text -> Foreground to be bright, and the Environment -> ToolTip to be dark.
It isn't a perfect solution, but it is usable until they fix it.
#karoberts answer is good although with the Visual Studio 2015 Color Theme Editor already installed I had to
Update the Editor Tooltip -> Plain Text -> Foreground to be bright, and the Environment -> ToolTip to be dark
apply the theme
restart Visual Studio (otherwise it wouldn't take the background)
But exporting/importing as in #karoberts answer was not necessary.
Try this
tools > options > fonts and colors > show settings for "Enviroment" > tooltip > item background
I created live template for creation of a stored procedure and I set availability in *.sql files. But when I'm in SQL file I don't have possibility to use live template by typing live template shortcut. I know that I have to change some setting in Visual Studio or in Resharper but I didn't find anything. Do you have any idea about that? I'm using VS 2013 and Resharper 8. Thank you.
Custom live templates should be able to work in .sql files.
You don't mention how you set your live template up, but here is how I acheived this with Visual Studio 2013 and ReSharper 8.2.
The example should allow you to type sf + TAB and get a select * from $TABLE$ template inside of a .sql file.
Go to ReSharper's Template Explorer via RESHARPER -> Templates Explorer...
Make sure you are on the "Live Templates" tab (the 1st one) of the Templates Explorer.
Under "Scopes" on the left side make sure "Global" is selected.
Click the new icon to bring up the template editor.
Add your template shortcut keys sf.
Add your template SELECT * FROM $TABLE$.
On the right side of the template editor window, select the link next to "Availability".
In the "Select Scopes" window that comes up, uncheck "Everywhere" and expand "In files matching".
Use the File mask *.sql
OK out and save your template.
The sf template should now be available in .sql files.
If you've followed these steps and it's still not working, you may have keyboard shortcut conflicts with another plugin. Consider reinstalling or repairing ReSharper or resetting the keyboard shortcuts via the RESHARPER -> Options -> Keybaord & Menus screen.
ReSharper's Live Templates only work in file formats that ReSharper supports, since Live Templates rely on other ReSharper features that need to understand languages, such as auto-formatting, name shortening and auto-imports and availability in scope. Also, Live Templates are inserted by selecting the item from ReSharper's code completion windows - if there's no code completion, there can't be any Live Templates.
Since ReSharper doesn't know about .sql files, you don't get Live Templates.
After each build, Visual Studio 2012 switches from the Solution Explorer to the Code Analysis tab, usually with the yellow "No code analysis issues were detected." (Might as well say "TA DA!").
Is there an option to turn off the tab switching (keeping it on Solution Explorer)? [because I can't find it either in Solutions or Options].
Thanks!
VS 2012
The best answer I have found so far is to drag the Code Analysis view's tab away from the Solution explorer. I've docked mine below the Solution explorer and made it about 1 inch high - so I can still see what it is reporting on the rare occasions when I wish to check it, but without losing my Solution Explorer all the time.
It's still unnecessary but a lot less irritating.
Update - VS 2013
In VS 2013 you can now click the Settings option in the Code Analysis view, and disable the Show window when issues are detected option.
Right Click Project --> Properties --> Code Analysis Tab --> Uncheck Enable Code Analysis on Build.
Hope that Helps.
Just found very helpful blog post about your issue Temporarily disable the C# static code analysis for a whole VS instance.
Also I have found way to permanently disable Code Analysis for all VS 2012 instances:
You need to add Windows environment variable with name "DevDivCodeAnalysisRunType" and value "Disabled" (all without quotes). There is helpful post about Windows environment variables How To Add/Edit Environment Variables in Windows 7.
Hope that helps.
Recently had to install Visual Studio on a new machine and when I open up my SQL scripts the editor is placing these blue lines around blocks of code. When the mouse hovers over these lines, text appears stating:
This is a block of SQL text.
You can modify this block with Query Builder
by choosing 'Design SQL Block' from the shortcut menu.
Finding this to be a nuisance and I can't seem to find any way to disable it.
In VS2005...
Tools -> Options -> Database Tools -> General ... uncheck "Enable DML markers". You'll need to close and reopen any sql scripts you have open that have the DML markers
If you'd rather keep the borders, but alter the color, the setting is the SQL DML Marker forecolor, under Text Editor, in Fonts and Colors:
Tools menu -> Options menu -> Environment section -> Fonts and Colors