Keyword Selection Background? - visual-studio-2010

I just installed MSVS2010 Ultimate & I've noticed something which is somewhat annoying & conflicting with my syntax highlighting, as can be seen:
alt text http://localhostr.com/files/19038c/capture.png
As can be seen, when a keyword/function/variable/etc is highlighted all other instances of the aforementioned are highlighted too. This is somewhat annoying.
Is there any way to disable this?

This is considered a new feature of Visual Studio 2010.
But a fast trick to disable is following these steps:
Tools -> Options -> Environment -> Font and Colors
Choose the item Highlighted Reference
Set its color equal to the background you are using (i suppose a
really dark gray from your screenshot)
I like this feature but I tuned the color a bit to have it only little more lighter than the background :)

When using Visual Assist, find "VA X Find Reference" in Display Items
(Tools -> Options -> Environment -> Font and Colors)

Looks like it might be Visual Assist X. If you have that installed, disable "Automatically highlight references..." on the Advanced | Refactoring page of the VA Options dialog .

This is a new feature from VS IDE to show you other changes tothis object. but ifyoudo not like it you can easily changed it by pressing
CTRL + ALT + Spacebar
you can read detail in my blog
updtae : thismentioned in VS2010 official Website here
You also can try CTRL+SHIFT+DOWN ARROW or CTRL+SHIFT+UP ARROW. see the VS page

Related

Is it possible to hide outline margin in Visual Studio 2012?

In Visual Studio 2012 it's a lot of margins to the left of source code text: Indicator Margin, Selection Margin and Outline Margin. As an old programmer i prefer an uncluttered text, so i want all 3 margins to be hidden from me. In Text editor settings i can hide indicator and selection margins, but i didn't found how to hide an outline margins. Outline graphics (all this "+" things and ines) can be easily hidden from "edit" menu, but margins itself remains. Is it possible to hide it or such feature is not implemented? In previous versions of Visual Studio it auto-hides if "selection margin" was disabled, but now it seems that it don't hide at all :(.
Update
A little clarification why I need it. As correctly mentioned in comments, it's very unusual to have preferences for text formatting and appearance. I agree with that. Unfortunately, in my personal case, I work with text like 10 hours per day for dozens of years and my brain is kind of trained to calculate indentation from text editor left edge. And every time I work in Visual Studio my "wrong indentation" instinct is often triggered by this empty space :). Of course i can re-train myself, but since ALL editors except Visual Studio displays text close to left edge, I will try to configure Visual Studio first.
Turn off the Indicator margin with Tools + Options, Text Editor, General, untick "Indicator margin"
Turn off the Selection margin with Tools + Options, Text Editor, General, untick "Selection margin"
Turn off the Outline bar with Edit + Outlining, Stop Outlining. That is however liable to come back when you open a new file. You can make it consistent for the C# IDE with Tools + Options, Text Editor, C#, Advanced, untick "Enter outlining mode when files open". If you want to do this for other kinds of files as well then you need to write an add-in that listens for the DocumentEventsClass.DocumentOpened event.
I've created an extension for this, it's for VS2015 but if you haven't upgraded yet it should work for VS2012 as well (assuming you're using an edition that supports extensions). The source code is only a few lines and is shown in the screenshot of the posted link.
http://blogs.msdn.com/b/saraford/archive/2007/09/13/did-you-know-you-can-hide-outlining-selection-margin-without-turning-off-outlining.aspx
Tools – Options – Text Editor – General, and uncheck Selection Margin...
This work?
Go to VisualStudio->Tools->Options
Drill down to Text Editor->C#->Advanced and uncheck "Enter outlining mode when files open"
Other language editors have similar options to disable outlining mode.
Any files you have open before changing this setting need to be re-opened, or you can turn off outlining from the context menu for each open file. Easier to just close/re-open.
Hope that helps!
Here's an extension that worked perfectly for me: https://marketplace.visualstudio.com/items?itemName=JustinClareburtMSFT.HotSettings
It has custom options to hide/show:
the entire margin
breakpoint margin
line numbers
selection margin
I can't tell if anyone actually answered your question (which is mine today!). Please see http://www.codeproject.com/Articles/109611/Color-Indicator-for-Code-Changes-Track-Changes-in and particularly the "Enable / Disable" section: "Go to Tools > Options > TextEditor. In General section, you can check or uncheck the 'Track Change' option."
Agree this feature is a big visual hassle during initial development, but it can be helpful during "maintenance" changes.
Corrected per "external link" comment.

How to hide reference counts in VS2013?

Visual Studio 2013 introduced a new feature where it shows you how many times each of your methods are used.
I don't find it very useful, and it messes up the spacing of my file. How do I disable it? Can't seem to find the option.
I guess you probably are running the preview of VS2013 Ultimate, because it is not present in my professional preview. But looking online I found that the feature is called Code Information Indicators or CodeLens, and can be located under
Tools → Options → Text Editor → All Languages → CodeLens
(for RC/final version)
or
Tools → Options → Text Editor → All Languages → Code Information Indicators
(for preview version)
That was according to this link. It seems to be pretty well hidden.
In Visual Studio 2013 RTM, you can also get to the CodeLens options by right clicking the indicators themselves in the editor:
documented in the Q&A section of the msdn CodeLens documentation
Another option is to use mouse, right click on "x reference". Context menu "CodeLens Options" will appear, saving all the navigation headache.
Workaround....
In VS 2015 Professional (and probably other versions).
Go to Tools / Options / Environment / Fonts and Colours.
In the "Show Settings For" drop-down, select "CodeLens"
Choose the smallest font you can find e.g. Calibri 6.
Change the foreground colour to your editor foreground colour (say "White")
Click OK.
The other features of CodeLens like: Show Bugs, Show Test Status, etc (other than Show Reference) might be useful.
However, if the only way to disable Show References is to disable CodeLens altogether.
Then, I guess I could do just that.
Furthermore, I would do like I always have, 'right-click on a member and choose Find all References or Ctrl+K, R'
If I wanted to know what references the member -- I too like not having any extra information crammed into my code, like extra white-space.
In short, uncheck Codelens...
In VSCode for Mac (0.10.6) I opened "Preferences -> User Settings" and placed the following code in the settings.json file
"editor.referenceInfos": false
User and Workspace Settings

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

Visual Studio 2010 - cannot find color setting for identifier-matching

I am looking for the option to set the background/highlight color for identifier-matches on Visual Studio.
For example, if I have an identifier:
int myNumber=0
Now, I put my cursor on into the middle of myNumber. Visual Studio highlights all other occurrances of myNumber on the page.
I cannot, for the life of me, find the color settings for this highlighting. At the moment in my color scheme it looks very much like the color for selected text. So, it is confusing and affects my productivity.
If anyone can track this down, you will be my hero.
It's a few months late, but the setting you're looking for is Highlighted Reference.
Since this comes up in the first Google search result, I'll also add that you may also have to enable the option if the colour you have selected isn't working. This is located in various places:
Text Editor, [Basic, C#], Advanced, "Highlight references to symbol under cursor"
Text Editor, C++, Advanced, "Disable Reference Highlighting"

What are your most-recommended Visual Studio preferences? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
There are so many little options and settings within Microsoft Visual Studio. Which adjustments do you recommend to others?
Line Numbers
Tools > Options
Text Editor > All Languages > General
Display: Line Numbers
Environment->General->Animate environment tools => OFF.
Speeds UI responsiveness by 82%.
I've never found dynamic help to be either dynamic or helpful, and just tends to slow visual studio down, so using regedit:
registry key:
HKEY_CURRENT_USER\Software\Microsoft\Visual Studio\x.x\Dynamic Help
value:
Never Show DH on F1 = yes
I'm also keen on setting the following in Options->Projects and Solutions:
Show Output window when build starts - checked
(IMHO easiest way to spot build errors)
Track Active Item in Solution Explorer - unchecked
(stops every project ending up fully expanded in Solution Explorer)
Gotta have the tab indention set up right.
Also, Consolas & Color Themed - white backgrounds hurt my eyes
Option Strict On
Tools > Options
Projects and Solutions > VB Defaults
Default project settings: Option Strict: On
Tools -> Options -> Environment -> Keyboard
Setup a shortcut to close the active document. Ctrl+Alt+W in my case.
Personally i hate that VS defaults to "Tab to Spaces" when you are developing in C#. This is so awkward to work with and unnecessary.
Yes, i know there are issues with Tabs but honestly, did any of you ever encounter them coding in C# on Windows?
Several have mentioned custom keybindings. Here are handy default keybinding reference posters…
Microsoft Visual Basic Default Keybindings reference poster
A high quality, print-ready PDF
containing the useful keybindings for
developers that choose the Visual
Basic developer profile in Visual
Studio 2008 or use Visual Basic
Express.
Microsoft Visual C# Default Keybindings reference poster
Visual C# in Visual Studio 2008 and
Visual C# 2008 Express Edition Wall
chart showing useful keyboard
shortcuts for Visual C# programming
language.
I like Microsoft's instructions:
Download and extract PDF
Send to favorite full color printer/copier
Hang on wall
Code
Smile
Set the active document you're working on to display in the solution explorer. I've seen a lot of people hunting for their current doc if the project gets too big.
Tools -> Options.
Make sure show all settings is checked.
Click on Projects and Solutions.
Enable the Track Active Item in Explorer checkbox.
alt text http://img370.imageshack.us/img370/4821/trackactivedocumentqv2.gif
Environment => General => Recent files
24 items shown in Window menu
24 items shown in recently used lists
Environment => General
Show status bar ON
Animate environment tools OFF
Prevent Visual Studio from renaming pasted controls
How do I prevent Visual Studio from renaming my controls?
Window Layouts
This really isn't a setting but something I always do is back up my settings via Tools > Import and Export Settings.
I make sure to back up my window layouts for both single and multiple monitors. It saves frustration when moving from my multi-monitor setup to a single monitor for a presentation.
Not to mention, it makes it easy to get up and running on a new PC.
Visible white space. (Edit -> Advanced -> View White Space)
The default color is too strong. I immediately change it to silver. (Tools -> Options -> Fonts and Colors -> Visible White Space).
On some displays, even silver is too strong, and I create a "light silver".
I'm somewhat surprised to be the first person recommending Visual Studio Hacks for a lot of suggestions of this variety
Fixedsys Font
Tools > Options
Environment > Fonts and Colors
Font: Fixedsys
Always show solution
Tools > Options
Projects and Solutions
Always show solution
Check out this thread for the Color theme options for Visual Studio
https://stackoverflow.com/questions/141371/which-visual-studio-color-theme
And consolas is my favourite font
This applies to winform projects.
Instead of opening the form in design mode by default, you can configure VS to open the code editor instead. This is configured by right-clicking on a form in the solution explorer and choosing the "Open with" option. This gives you a dialog that allows you to specify the default option when double-clicking on a file.
In a control's properties, setting GenerateMembers to false for items you don't need (labels, etc). It's not a specifically Visual-Studio thing, more related to the platform, but mixed with the contextual list of objects and functions, it just clears up so much clutter.
When designing a form:
View > Tab Order
Allows you you specify and control your TabIndexes easily (much more so than setting them by hand!)
Source View
Tools > Options
HTML Designer > General
Start pages in: Source View
Its all about Resharper ;) Gives you tons of shortcuts which are so useful I can no longer work without them. I don't get on with the intellisense though, so I've turned that off.
This is incredibly useful, allows you to write underscores with the space bar when writing long test method names.
Un-Bold Brace Matching
Tools > Options
Environment > Fonts and Colors
Display items: Brace Matching (Hilight)
uncheck Bold
Find and Replace window’s "Search Hidden Text" checkbox.
It's not really a preference but it is indispensable. It sure is frustrating when you don’t notice that it "magically" unchecked itself.
Besides, Line Numbers, the first thing I always do in a newly-installed IDE is set the Edit.GoToDefinition keyboard shortcut.
Tools > Options > Keyboard

Resources