Disabling autocompletion from spacebar in VS 2022

Jingo Unchained 66 Reputation points
2022-03-05T01:02:44.72+00:00

This problem is maddening and the only thing I've found is that 2019 isn't going to see a fix for it. I found a couple listed fixes for earlier versions to remove the spacebar from the list of keys that trigger autocomplete but not even a mention of the issue in 2022.

At any rate, it's incredibly frustrating, to the point that I've just turned off intellisense and intellicode, which is unfortunate because i want to use them. But I'm constantly having to go back and correct its erroneous assumptions. For instance, if I try to create a property called "Name" instead it corrects me to "namespace" - because clearly "public string namespace" is what I was going for and not "public string Name { get; set;}"

I've spent an hour searching through the settings and googling this - how do I disable this in the latest version? Is there a way?

Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
1,005 questions
{count} votes

Accepted answer
  1. Anna Xiu-MSFT 29,926 Reputation points Microsoft Vendor
    2022-03-07T08:41:33.003+00:00

    Hi @Jingo Unchained ,

    Welcome to Microsoft Q&A!

    For your requirement, you can try to use the option to change the IntelliSense completion mode: Edit > IntelliSense > Switch between automatic and tab-only IntelliSense completion or shortcut: Ctrl+Alt+Space.

    Or you can also set the IntelliSense completion mode to Tab-only: Tools > Options > Text Editor > Advanced > Default IntelliSense completion mode: > select Tab-only in the dropdown.

    Sincerely,
    Anna
    *
    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    14 people found this answer helpful.

3 additional answers

Sort by: Most helpful
  1. Yarden Schorr 21 Reputation points
    2023-01-08T10:33:23.187+00:00

    Worked perfectly on visual studio 2022 for me
    *need to restart visual studio 2022

    thanks!!

    4 people found this answer helpful.

  2. Jingo Unchained 66 Reputation points
    2022-03-07T11:34:39.55+00:00

    That works perfectly, thank you so much! I don't know how many times I looked right at that setting and it didn't register. Thank you!

    1 person found this answer helpful.
    0 comments No comments

  3. Dave de Jong 0 Reputation points
    2023-03-07T16:35:20.0133333+00:00

    The Tab-only option works like a charm. Still it's weird that you cannot type spaces in html attributes by default.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.