简体   繁体   English

Visual Studio 2015支撑不能正常工作

[英]Visual Studio 2015 bracing doesn't work properly

In Visual Studio Ultimate 2013 I could write: 在Visual Studio Ultimate 2013中,我可以写:

public void Foo()  

And then write left brace + enter and i received: 然后写左括号+输入我收到:

public void Foo()  
{  
  | <- My cursor's position  
}  

But in Visual Studio Community 2015 if I do it too fast i will receive: 但是在Visual Studio Community 2015中,如果我执行得太快,我会收到:

public void Foo() { }  
| <- My cursor's position

I tried to reset settings, change settings in text editor and import settings from VS 2013 but it didn't help. 我尝试重置设置,更改文本编辑器中的设置以及从VS 2013导入设置,但它没有帮助。

Everything is ok if I wait something like 0.5 sec after writing "{" and then put enter. 如果我在写完“{”然后输入后等待0.5秒后,一切都会好的。
Do you know where is a problem? 你知道哪里有问题吗?

I'm sorry if my english isn't correct. 如果我的英语不正确,我很抱歉。

It works on my system. 它适用于我的系统。 I am running Windows 10 and VS 2015 REL version 14.0.23107.0 D14REL, without any extra tools. 我正在运行Windows 10和VS 2015 REL版本14.0.23107.0 D14REL,没有任何额外的工具。

After a brief investigation the autocomplete uses the Microsoft.VisualStudio.Text.BraceCompletion Namespace and there is a "PreTab" method that might be fun to investigate. 经过简短的调查后,自动完成功能使用了Microsoft.VisualStudio.Text.BraceCompletion命名空间,并且有一个“PreTab”方法可能很有趣。

One way to investigate would be to install the Visual Studio Extensibility Tools , and try some new things like maybe using the PreTab to implement some helper to save you key strokes. 一种研究方法是安装Visual Studio Extensibility Tools ,并尝试一些新的东西,比如使用PreTab实现一些帮助来节省击键。

Another way would be to check out the Visual Studio Extensibility Samples on GitHub: https://github.com/Microsoft/VSSDK-Extensibility-Samples . 另一种方法是在GitHub上查看Visual Studio可扩展性示例: https//github.com/Microsoft/VSSDK-Extensibility-Samples

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM