In Notepad++ for example when your cursor is next to a brace it will highlight the corresponding opening or closing brace on screen.
Check out the link below for a example as to what I mean.
http://www.atmel.com/webdoc/visualassist/visualassist._match.html
How can Visual Studio do this?
The Visual Studio 2013 C# editor has brace highlighting. Place the cursor on the outside of the brace, (not the inside) to see the highlight.
The default color is very subtle, use the Tools\Options\Fonts And Colors setting to apply a different highlight color.
Related
In VS Code and JetBrains IDEs, when you select (highlight) a snippet of code and press an opening key for brackets ({ or [) or parentheses ((), it wraps the selected text. Visual Studio, however, deletes the selected snippet, or better, replaces it by the pressed character. Is there a way to configure it to the more intelligent behaviour of VS Code and JetBrains? I browsed "Text Editor" settings but didn't find any that seemed to do this:
In visual studio 2019, if you click a word, it will highlight all its occurrences.
But if click some blank place, it will de-highlight all.
I only want to highlight the words when double-clicking it, and de-highlight the words if I double click it again.
It differs for each programming language. For C/C++ it's:
Tools/Text Editor/ C/C++ /Advanced/Disable Reference Highlighting (in
References section)
"MultiWordHighlight" is a great extension which can replace visual studio's internal feature.
In VS 2015 I'm getting a weird brace highlighting effect. Using the Dark theme, I'm getting a light gray box around the pair of braces, parens, or quotation marks when I place the cursor after the closing token.
I though that this was a plugin, but I disabled both CodeRush and Productivity Power Tools and it is still happening.
I thought that VS 2013 did the same thing, but I can't remember how to turn it off.
Tools -> Options
Environment -> Fonts and Colors
Brace Matching: Set foreground and background to "Automatic".
No need to change Brace Matching (highlight) or Brace Matching (rectangle)
How can I remove unwanted border around the matching braces in Visual Studio 2013?
Update:
By "border" I mean the little border which surrounds green rectangles. VS2012 doesn't create it, VS2013 creates it.
Visual Studio 2012 behavior:
Visual Studio 2013 behavior:
Tools -> Options -> Environment -> Fonts and Colors -> Brace Matching (Rectangle) and Brace Matching (Highlight), set the item foreground and Item background the same colors for both.
If you have ReSharper it's ReSharper Brace Outline and ReSharper Matched Brace, set the Item foreground and Item Background the same for both.
When I moved from Visual Studio 2008 to Visual Studio 2010, there seems to only be a small section of pointing space (for the mouse) to click and drag and click again, to grab a few lines of code. This is about 8 pixels wide and is referred to as the Selection Margin. I often used this area in Visual Studio 2008 to select/copy/paste code. Now I have to rely on using the keyboard, which is not difficult, but if I'm using the mouse, Visual Studio is not very intuitive or usable. Is there a way to prevent the highlighting of lexical groups (where the expand/collapse or plus/minus sections are) so I can just select the lines of code instead? They seem to call this block highlighting. Most of the surface area to the left of the text in Visual Studio 2010 seems to be dedicated to the block highlighting. The text editor freezes when a lexical block of code is highlighted and I cannot use the right context menu. The right context menu is also only available from inside the text editor now, so I have to select my lines in that 8 pixel region, then move my mouse over to the right to copy. My productivity in Visual Studio 2010 has decreased substantially because of this change.
I'm wondering if anyone has written any extensions with the Visual Studio 2010 editor to fix these issues?
http://www.codeproject.com/KB/macros/WriteExtensions.aspx
Options > Text Editor > All Languages > Show line numbers. This allows you to have more space to select and copy the lines, but you still must go over to the right (where the code is) to copy.
Have you tried to select in a so called 'Continuous Stream Mode' which is supported by VS 2010 by default? Here's what I mean -> Hold down the SHIFT key and click in the Selection Margin(located at the far left of the Editor window, to select a whole line.) to extend your selection line by line.
Regards,
Evgenia