Stephan Luis
Stephan Luis

Reputation: 921

Visual Studio Underscore in Green _ ( not green squiggly)

Visual Studio 2013 frequently marks my code with a green _ ( green underscore bar).

enter image description here

What does it represent and is there a feature that it's linked to, like auto complete or intellisense ?

Upvotes: 11

Views: 1758

Answers (2)

Mrfrog
Mrfrog

Reputation: 75

Just go to tools, then options. You will see the item fonts & Colors there you can choose what you wanna do in such part of your code, such as choosing the type of text and color.

Upvotes: -1

Nacimota
Nacimota

Reputation: 23245

This is the automatic brace completion feature that was introduced in Visual Studio 2013 (although, like so many new features in Visual Studio, it was actually in the Productivity Power Tools extension first).

When you write an opening brace, Visual Studio 2013 inserts a closing brace for you automatically. The underline simply indicates that the code editor is still in brace-complete mode. While in this mode, Visual Studio is waiting to see if you close the brace yourself, in which case it will remove the redundant brace and move the text cursor if necessary. While in this mode, you can also press tab to move the cursor past the closing brace; although, this only seems to work when both braces are on the same line and there is nothing (except whitespace) between the cursor and the closing brace. Moving the cursor outside of the braces exits this mode.

This feature works not only for braces, but also parentheses, square brackets, and quotes (single and double).

You can enable or disable this feature by checking or unchecking the Automatic brace completion checkbox located in:

Tools → Options → Text Editor → All Languages* → General

* or a specific language, e.g. C#

Upvotes: 12

Related Questions