1

For years I've auto-completed intellisense suggestions with ENTER and semi-colon.
For some reason however, the only key that now does this for me is TAB.

You might think this would answer the question, but this is about Visual Studio Code:
How to enable autocomplete when pressing enter in VS C#

This is a bugreport that the feature doesn't work anymore, with a reply that it has been fixed:
https://developercommunity.visualstudio.com/content/problem/41831/c-autocomplete-enter-inserts-new-line-instead.html

I don't have the following setting, starting with a preferences menu, I've used the search function to look for anything like what the setting should be and found nothing:
VisualStudio -> preferences -> intellisense and uncheck the box "complete with space and interpunctation"

I've already changed the on enter behavior to never add a new line but new lines are always added on enter, so this setting doesn't seem to have any effect. And it wouldn't be enough anyway, I want auto-completion of intellisense suggestions on more keys.

MrFox
  • 4,852
  • 7
  • 45
  • 81

1 Answers1

1

I've already changed the on enter behavior to never add a new line but new lines are always added on enter, so this setting doesn't seem to have any effect.

Since VS2017 and later version, we can change the Intellisense behavior of enter key----not add a new line by what you did on above. So I wonder you did any changes to Tools or there is some effect of third party extensions.

In my side, l can use the Enter key to pop the suggestion which l select into the text editor without adding a new line at the same time.

Anyway, please try these steps:

1) reset all the settings by Tools-->Import and Export Settings-->Reset all the settings and then select Never add new line on enter by Tools-->Options-->Text Editor-->Basic-->Intellisense-->Enter Key Behavior(if you use Visual Basic and you can choose to change any language's format in Text Editor menu)

2) try to disable any extensions by Extensions-->Manage Extensions or use devenv /safemode in Developer Command Prompt to start VS to test it.

3) close VS Instance and then delete .vs hidden folder under the path of the solution and then restart the project to check whether the issue persists.

In addition, if you still want a new custom key like the Intellisense effect of Tab, you can just assign a new shortcut key to Tab.

Try this:

Tools-->Options-->Environment-->Keyoard-->input edit.tabs just as this picture shows:

enter image description here

Enter a new shortcut key in Press Shortcut Keys menu box and then click Assign.

Mr Qian
  • 21,064
  • 1
  • 31
  • 41
  • None of this helped. The Edit.tabs only allows for a single key combination. And I couldn't change the setting for Global, only on TextEditor. That shouldn't be a problem, except it seems this removes the existing (new line) action in all contexts. So I no longer have a new line function in the text editor at all. – MrFox Feb 06 '20 at 10:39
  • First, l wonder why you click the `never add a new line but new lines` button and then do not show the normal behavior. In my side, it works well and not add any new line. So please try to reset your settings and disable any third party extensions to check. Second, change to use `Edit.InsertTab` not `Edit.Tabs`, and when you add a new shortcut and then assign it, it will add a new key not overwrite any keys before. As for me, I set `Alt+C` and it works well. – Mr Qian Feb 07 '20 at 08:01
  • If you have any concern or other issues, please feel free to let us know. – Mr Qian Feb 07 '20 at 08:04