Visual Studio: How can I disable the blue blocks surrounding my blocks of SQL? - sql

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

Related

Scroll down in Visual Studio 2022

is it possible to scroll down in Visual Studio 2022 just as if I was using scroll wheel? Say for example using some shortcut. I want to keep the cursor at the same line I am at, but move the code a little higher on the screen, without getting my hands off keyboard.
As was mentioned in the comments, the default keybinding for this are Ctrl+Up and Ctrl+Down. Keyboard shortcuts can also be reconfigured in the Tools -> Options -> Environment -> Keyboard settings.
The commands to configure are Edit.ScrollLineUp and Edit.ScrollLineDown. There are several other scroll related commands, but I'm not sure what all of them do (they may not be applicable in the text editor).

How to update colors for object explorer menu in SSMS

I am using dark mode on SQL Server and I have tried to update the font and colors for the object explorer menu, but I seem to be unable to find the appropriate settings to update the menu colors from Options > Fonts and Colors.
Here is what my menu looks like when a right-click an object from the Object Explorer
Is there a way to update the text on the right-hand side so it's easier to read?
I am using Microsoft SQL Server Management Studio 17.
I don't think there is a solution for chaning the sub-menu color unless you can inject the dll / exe file of SSMS.
A workaround is here:
https://www.sentryone.com/blog/aaronbertrand/making-ssms-pretty-my-dark-theme

Eclipse SQL Editor normal text color

I was able to change all the other SQL syntax coloring in Eclipse Preferences, but the normal (non-Sql-syntactic) text is still black and I couldn't find where to find the setting for that. Black text is kind of hard to read against an almost black background. Thank you!
If you are looking for the place to change the Text Editor color settings, go to Preferences->General->Editors->Text Editors, select "Foreground color" in "Appearance color options", uncheck "System Default", click on the color and choose the color you want.
If you want to change the SQL Editor color settings, go to Preferences->Data Management->SQL Development->SQL Editor->Syntax Coloring.
Edit: You need to change the "Others" item in SQL Editor's syntax coloring. It's working on my Mac, anyway. First uncheck "Default foreground color" and then choose the color you want.
Edit: For those not seeing the change, after selecting "Apply and Close", you must Restart your workspace to see the changes.
File -> Restart
Alexis Dufrenoy is absolutely right:
If you want to change the SQL Editor color settings, go to Preferences->Sata Management->SQL Development->SQL Editor->Syntax Coloring.
Edit: You need to change the "Others" item in SQL Editor's syntax coloring. It's working on my Mac, anyway. First uncheck "Default foreground color" and then choose the color you want.
Just in Luna release I have to restart Eclipse every time after changing SQL syntax coloring (other editors work without restart).
Its strange, but with Windows 7 its the only way.
I was having trouble with the existing answers on Version: 2019-03 (4.11.0)
Change the color of the "Others" option here to change the black text
You may also find it useful to similarly change the other options like "Single Quoted String" (blue default) , "Type" (purple default)
Since 2019-03-14 there is standalone and very simple SQL editor plugin available at eclipse marketplace: https://marketplace.eclipse.org/content/sql-editor - it's just for editing SQL files, syntax highlighting and contains an experimental SQL formatter. It has full customizable colour preferences and also good looking defaults for dark theme - see https://github.com/de-jcup/eclipse-sql-editor/wiki
It is open source, works out of the box, is small and has no dependencies.
So it could be a good alternative.
PS: I am the author of the mentioned plugin.

No xaml color formatting in visual studio 2012

This is the second time i have installed VS 2012 and the first time the color formatting for xaml was working but not anymore. If i can change some element in the tools -> fonts and colors but i cant get the normal default scheme back with the blue | red | yellow look, even if i change back to defaults.
Any help would be nice. Thanks
I've had this exact same issue. The solution is:
close all running instances of Visual Studio
open a "Run" window and type in devenv /resetuserdata
That's it. Open your projects again and everything should work fine.
Beware: your personal settings will be lost. Recently opened projects list also.
Right click on the .xaml file -> open with option from the list choose HTML Editor With Encoding
You can try Tools -> Options -> Environment -> Fonts & Colors and Display Items as Use Defaults..as suggested by gerdi...Also make sure all options are ticked Under Tools -> Options -> TextEditor -> General...

Turn Off Visual Studio/VB.Net Lines around each method

In Visual Studio when working in VB.Net, it automatically creates lines/regions around methods etc.
How can this be turned off somewhere in the options?
If you open Tools ==> Options, and select Text Editor, there is a "Basic" section for Visual Basic. This option is on the "VB Specific" sub-section. Unselect "Show procedure line separators".
Using Visual Studio 2017 and above
For C# and Basic
Open Tools > Options or press Alt + T + O
At the top of the list search for "Show procedure line separators"
select Advanced
In group box Outlining
Uncheck "Show procedure line separators"
This is known as "Outlining Mode" and can be disabled by doing the following
Tools -> Options -> Text Editor
Navigate to the Basic -> VB Specific sub category
Uncheck "Enable outlining mode"
For anyone that comes across this and is using Visual Studio 2012. Those lines are off by default. If you want the lines back then you need to:
Tools -> Options -> Text Editor
Navigate to the Basic -> VB Specific sub category
Uncheck "Enable outlining mode"
Yes, these are the same steps that JaredPar explained to turn the lines off. However, it's completely backwards in 2012 and unchecking this option will bring the lines back.
Way to go Microsoft!
The menu sequence is a bit different for VS2015.
Tools -> Options -> Text Editor -> Basic -> Advanced
Uncheck "Show procedure line separators."