c# - 光标停留在我在 VS 文本编辑器中单击的位置

标签 c# visual-studio-2010

很抱歉提出问题,但我无法在互联网上的任何地方找到答案。我自己也找不到答案。这是问题:

以前,当我在 VS 文本编辑器中单击任意位置时,光标移动到语句末尾,就在“;”之后。但现在它停留在我点击屏幕的位置,这真的很烦人。我该如何解决这个问题。提前致谢。

最佳答案

这称为虚拟空间,可以在 Visual Studio 的选项对话框中更改。

根据 MSDN文章:

To position comments beside your code

  • In the Options dialog box, expand Text Editor, and then click the General node for your development language.

  • Under Settings, select Enable virtual space.

When this option is selected and Word wrap is cleared, you can click anywhere beyond the end of a line in the Code Editor and type.

要恢复到您想要的行为,您需要在语言级别或为所有语言取消选中启用虚拟空间:

Visual Studio options dialog showing unchecked virtual space setting

还有更多here .

关于c# - 光标停留在我在 VS 文本编辑器中单击的位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11274224/

相关文章:

c++ - 使用 comsupp.lib 的内部链接器错误

c# - 如何向 VS2013 语法扩展 (MEF) 动态添加补全词

c# - 获取 EventHub PartitionId 列表时遇到错误。微软AzureAmqp

c++ - C2653 : 'GUI' : is not a class or namespace

c++ - 使用 CreateWindowExW 时堆损坏

visual-studio-2010 - 编写 VS2010 扩展

c# - 提高速度的不安全 C# 技巧

c# - LINQ lambda 根据未知键拆分记录集

c# - 为 Canvas 上重叠的矩形触发 MouseDown 事件

visual-studio-2010 - 重新启用由于多个错误而被应用程序禁用的 VSTO 加载项