How to change Visual Studio whitespace settings? - visual-studio

I have whitespace characters showing in the Visual Studio code editor, and I'd like to remove them.

Ajryan is correct but depending on your profile this menu item may be obscured. The keyboard shortcut should still work though. Ctrl+R,Ctrl+W

You need to turn off showing whitespace characters. Menu: Edit > Advanced > View White Space.

If it is VS2008 then you can use Ctrl+E, S combination to toggle.

For Visual Studio 2019:
Toggle on/off - Option 1: Ctrl+R,Ctrl+W
Toggle on/off - Option 2: Edit > Advanced > View White Space
Change appearance: Tools > Options > Environment > Fonts and Colors > Visible White Space (near top of list, probably because it is a commonly used setting)

Related

Make all opened document tabs visible

I would like to see all files or documents I've opened in Visual Studio. I do not want them to be auto hidden or hidden on overflow.
How can I achieve it?
One of the built-in option to do so: use pinned tabs.
http://dailydotnettips.com/2016/01/21/persevering-and-separating-the-pinned-tabs-in-visual-studio/
If you don't want to read a external page just for setting:
Tools -> Options -> Environment -> Tabs and Windows -> Show pinned tabs in a seperate row
It's not completely what you want, but it's free and may be useful.
Maybe it's not exactly what you search, but here is a way to at least get a second row for pinned tabs.
Effectively get you more space for opened files:
Tools -> Options -> Environment -> Tabs and Windows -> Show pinned tabs in a seperate row
Visual Studio has this extension taken from msdn.microsoft.com tested and worked
Simple installation: download, doubleclick to install, restart VS IDE. Then open all the tabs you want they all will be displayed and No hidden.
https://visualstudiogallery.msdn.microsoft.com/EBF6137E-AA2D-4DC9-860A-F04168F11CD7
Dung Le.
It's worth noting that starting in VS 2019 v16.4, you can now have "vertical tabs" which will list all open tabs vertically, making it easy to see all open files.
https://learn.microsoft.com/en-us/visualstudio/ide/customizing-window-layouts-in-visual-studio?view=vs-2019#vertical-document-tabs
In Visual Studio 2022, this issue now has a native solution. Go to Tools -> Options -> Environment -> Tabs and Windows -> Show tabs in multiple rows. Excess tabs will be shown on additional rows. There doesn't seem to be a limit on how many rows this can use.
Another relevant option that some may find useful; you can choose "Show invisible tabs in italic in tab dropdown menu". The dropdown button is only visible when you hover your mouse near the end of the row of tabs. Showing invisible windows in italics makes it easier to identify windows that are only visible in the overflow menu.
For those using Visual Studio 2022, check the "Show tabs in multiple rows" setting in Tools > Options > Environment > Tabs and Windows section.
For Visual Studio Code
If you want to see all the opened tabs,
you can simply on wrap tabs option in the VS Code settings
settings > User > Workbench > Editor > Wrap Tabs

How to turn off CodeLens-References

I recently installed Visual Studio 2013 Ultimate.
Now, as you know, there is this "n references" above all methods.
When I go to the CodeLens options, I can't disable this single feature, since the checkbox is grayed out.
So how can I disable it?
Only workaround I found was un-checking the "enable codelens" option.
The References indicator is required to be on because it is the only one that knows how to do "placeholder" items (the one that says "- references"), and is guaranteed to show up everywhere that codelens appears.
If you could turn off references, then it is highly possible that codelens would reserve space for indicators, and yet no indicators would ever appear, so you would end up with blank lines on every method/class/property that aren't real blank lines, they're just reserved space for codesense elements that will never appear.
I'd suggest using the "send a frown" thing in visual studio and commenting about this if you want to turn just references off.
If you want to keep the CodeLens functionality but mostly get rid of the references, go to:
Options/Environment/Fonts and Colors
Show settings for: CodeLens
and change the settings to:
Font: Consolas
Font Size: 6
Indicator Text: White
Indicator Text (Disabled): White
Indicator Separator: White
Choosing Consolas reduces the line height beyond the default Calibri font, even at font size 6. There might even be a smaller font that you can use but I haven't found it.
If you have a dark background choose a matching dark color instead of White where it is mentioned in the steps above, since the goal is to hide the CodeLense text.
In Visual Studio 2015.
Tools > Options.
Text Editor > All Languages > CodeLens.
Uncheck “Enable CodeLens”

VS2012 How to turn off editor tab colouring?

I strain to read the tabs in the source code editor of Visual Studio 2012.
I don't even understand what the different colors mean? They seem totally random. Black on brown or black on blue.... who choose that?
So I would like to turn off the colouring for the tabs and revert to black on white, or a light grey.
I've looked in:
Options>> Environment (General / Font and Colors)
but I cant see anything relevant. So how can I do this please?
Looks like you might have Productivity Power Tools installed? If so turn off Custom Document Well or look in the Options > Productivity Power Tools > Custom Document Well > Advanced, there is an option to set colour to Visual Studio.
Or you could set: (In VS2015)
Options > Productivity Power Tools > Custom Document Well > Advanced
Then under Colors and Gradients panel, in the Selected Tab drop down choose VS Colors ,
This allows you to keep colored tabs by project yet highlights the selected tab clearly, win win...
My selected Tab is now bright Blue all the time.
The colors of each tab comes from productivity power tools. For each project power tools assign a colors, so developer can easily detect a file(if contain same name) belongs to which project.
For VS 2013 & 2015 you can easily remove those color by unchecked Colors tab by project following below steps
go to Tools > Options > Productivity Power Tools > Custom Document Well > General

Highlighting current line in VS.NET Code Editor

Is there anyway to change the color of the current line (that cursor is blinking)?
I try to find such an option in "Options > Environment > Fonts and Colors" but couldn't find a color option for this.
Highlight all occurrences of selected word or HighlightLine
from the Visual Studio gallery.

Disabling highlighting of current line in the Visual Studio editor

The Visual Studio editor highlights the current line by changing the background color of the current line. Is there a simple way to disable this highlighting? Otherwise, which parameter in Fonts and Colors dialog controls the background color of the currently selected line in the editor?
Is there a simple way to disable this highlighting?
Tools -> Options -> Text Editor, in the Display group, uncheck "Highlight current line"
Which parameter in Fonts and Colors dialog controls the background color of the currently selected line in the editor?
The colors are named "Highlight Current Line (Active)" and "Highlight Current Line (Inactive)"
To disable the border around the current line
In VS 2019
Go to : Environment -> Fonts and Colors:
Find the display item: Highlight Current Line
Set the item foreground color to: Automatic
In VS 2017 and earlier
Go to : Tools -> Options -> Text Editor:
Find the display items:
Highlight Current Line (Active)
Highlight Current Line (Inactive)
Set the item foreground color to: Automatic
if its visual code make
"editor.renderLineHighlight": "none"
The Visual Studio editor highlights the current line by changing the background color of the current line.
The only time I've seen this is when "Use Windows High Contrast settings" is enabled (Options > Environment > General)
With this setting disabled, I just get a subtle grey box to indicate the current line (this may depend on your Color Theme):
If you're using Resharper, it's:
Tools -> Options -> Text Editor:
ReSharper Current Line Highlight
press -> Ctrl + comma
Search => Render Line Highlight
select none from the options
In addition to the previous answer, I'd like to mention that Visual Assist (the tomato icon) also have an highlight current line feature, that can still be active while your Visual Studio highlight option is turned off.
This drove me crazy! Find it in Visual Assist Option panel, Display category.
So don't forget to also uncheck the VisualAssist highlight option.
edit
my settings:
Visual Assist option turned off
Visual Studio option turned on (in the Text Editors part)
In the font color settings, for Highlight current line (active and inactive), set the foreground to Automatic
Finally you can set your highlight color as you want with the background color.
Last point, sometimes Visual Studio mess things up even more, you may have to restart it, or close/open your tabs... sadly, YMMV.
For VsCode 2021 version users
Workspace > Text-Editor > Render Line Highlight > none
Visual assist and vsvim extensions were conflicting. So I disabled it within the visual assist options.
Uncheck the option: Highlighting->Highlight results of Quick Find and Find in Files.
For some reason "esc" doesn't work .

Resources