Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stop default Autocomplete behavior when hitting spacebar in Visual Studio 2015

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.

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?

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.

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)

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

like image 584
Jeremy Holovacs Avatar asked Aug 30 '15 22:08

Jeremy Holovacs


People also ask

How do I turn on autofill in Visual Studio?

The suggestion list of Automatic completion appears as soon as you start typing a new identifier. The suggestion list of Basic completion appears when you press the default Visual Studio IntelliSense shortcut Ctrl+Space . If necessary, you can always return to the Visual Studio's native's IntelliSense.

How do I stop VSCode autocomplete?

By default, VS Code shows snippets and completion proposals in one widget. You can control the behavior with the editor. snippetSuggestions setting. To remove snippets from the suggestions widget, set the value to "none" .

How do you toggle IntelliSense?

To toggle between completion mode and suggestion mode, press Ctrl+Alt+Space, or choose Edit > IntelliSense > Toggle Completion Mode.


3 Answers

Edit -> Intellisense -> Toggle Completion Mode

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

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

like image 179
Robbie Avatar answered Oct 12 '22 03:10

Robbie


For all who have the same problem in Visual Studio Code, add this line to the User Settings:

"editor.acceptSuggestionOnCommitCharacter": false
like image 20
Dionysos Avatar answered Oct 12 '22 04:10

Dionysos


change the setting for Editor: Accept Suggestion On Enter to off

like image 3
Chris Concannon Avatar answered Oct 12 '22 03:10

Chris Concannon