在Visual Studio 2015中按空格键时停止默认的自动完成行为 [英] Stop default Autocomplete behavior when hitting spacebar in Visual Studio 2015

查看:119
本文介绍了在Visual Studio 2015中按空格键时停止默认的自动完成行为的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

注意.此处的关键字为默认".我知道我可以逃脱,并且默认行为会中止.我不想每次IDE认为知道我想要的内容时都按下逃逸键.我在2013年不必这样做.

NOTE The keyword here is "default". I know I can hit escape and the default behavior gets aborted. I don't want to hit the escape key every time the IDE thinks it knows what I want. I didn't have to do this in 2013.

附录2 :我似乎仍然很难在这里传达自己的想法.当我按下空格键时,我只想什么都没有.我只希望在屏幕上显示一个空格字符.我唯一想让IDE真正插入建议的时间是当我按下选项卡栏时.我希望这更清楚吗?

ADDENDUM 2 It seems I'm still having difficulty communicating what I'm after here. What I want to happen is nothing when I press the space bar... I just want a space character to show up on my screen. The only time I want the IDE to actually insert a suggestion is when I hit the tab bar. I hope that's clearer?

这真让我发疯.在2013年及之前的版本中,您可以设置完成字符(也许是锐利的?),但在2015年,我看不到任何方法可以停止默认的自动完成行为.

This is driving me nuts. 2013 and before allowed you to set completion characters (maybe that was resharper?) but in 2015 I see no way to stop the default behavior of autocomplete.

例如,假设我有一个类Foo,但是我还没有指定名称空间,但是如果我键入以下内容,则在指定的名称空间之一中有一个类FooBar:

For example, say I have a class Foo, but I don't have the namespace specified already, yet I have a class FooBar in one of the specified namespaces, if I type:

public void DoSomething(Foo// <-- then a space)

...它会自动放入FooBar.我该如何关闭这种行为?

...it automatically puts FooBar. How the heck do I turn off this behavior?

我应该提一下,我仍然想要自动完成功能,只是在选项卡上即可.

I should mention that I still want AutoComplete, just on tab though.

推荐答案

编辑-> Intellisense->切换完成模式

Edit -> Intellisense -> Toggle Completion Mode

来自: https://msdn.microsoft.com/en-us/library/hcw1s69b.aspx

您还可以更改为建议模式,在该模式下,仅将您键入的文本插入到代码中.例如,如果您输入的标识符不在列表中并按TAB,则在完成模式下该条目将被替换要在完成模式和建议模式之间切换,请按CTRL + ALT +空格键或单击编辑/IntelliSense/切换完成模式"."

"You can also change to suggestion mode, in which only the text you type is inserted into the code. For example, if you enter an identifier that is not in the list and press TAB, in completion mode the entry would replace the typed identifier. To toggle between completion mode and suggestion mode, press CTRL+ALT+SPACEBAR or click Edit/IntelliSense/Toggle Completion Mode."

这篇关于在Visual Studio 2015中按空格键时停止默认的自动完成行为的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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