Visual Studio下划线为绿色_(不是波浪状的绿色) [英] Visual Studio Underscore in Green _ ( not green squiggly)

查看:239
本文介绍了Visual Studio下划线为绿色_(不是波浪状的绿色)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Visual Studio 2013经常用绿色_(绿色下划线栏)标记我的代码.

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

它代表什么,并且有链接的功能,例如自动完成或智能感知吗?

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

推荐答案

这是生产率电动工具扩展首先).

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).

在编写一个右括号时,Visual Studio 2013会自动为您插入一个右括号.下划线仅表示代码编辑器仍处于大括号完成模式.在这种模式下,Visual Studio正在等待您是否自行关闭花括号,在这种情况下,它将删除多余的花括号并在必要时移动文本光标.在此模式下,您还可以按Tab键将光标移到右括号旁边;虽然,这似乎仅在两个大括号都在同一行上并且光标和右大括号之间没有任何内容(空格除外)时才起作用.将光标移到大括号外即可退出此模式.

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

*或特定语言,例如C#

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

这篇关于Visual Studio下划线为绿色_(不是波浪状的绿色)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆