Visual Studio 2017: Disable Intellisense for CodeSnippets

前端 未结 4 828
感动是毒
感动是毒 2021-01-13 03:45

I\'m using Visual Studio 2017 Enterprise, Version 15.3.3

I looks like IntelliSense has some new features for code completion. On of this feature is, that a field nam

相关标签:
4条回答
  • 2021-01-13 04:02

    This actually works correctly in Visual Studio 2019 for classes if it is a class that is valid for the current context (i.e. Doesn't exist in a namespace not in the current class namespace or in the using statements for the file).

    Here is my example snippet

    Snippet Definition

    Snippet Use

    And here is an example where I use two different classes as the second snippet, one that is a valid class name and works to use tab to autocomplete, and one doesn't work because the class requires adding an additional namespace using statement that is currently missing from the file:

    So I see two options.

    1. Use the sucky to cancel any auto-complete logic.
    2. Ensure you have the proper using statements. You can even add using statements to your snippet using the imports declaration:
    0 讨论(0)
  • 2021-01-13 04:06

    Now there has no such option to disable this intellisense feature inside code snippets, but you can try to click 'Esc' key after type 'other', then click 'Tab' key to jump to next literal, please check the following:

    0 讨论(0)
  • 2021-01-13 04:15

    How to: Manage Code Snippets

    To access the Code Snippets Manager

    1.) On the Tools menu, click Code Snippets Manager. Shortcut Ctrl+K,Ctrl+B

    How to: Change snippet behavior

    To change snippet behavior.

    1.) Go to Tools > Options > Text Editor > IntelliSense > Snippet Behavior

    2.) See images.

    0 讨论(0)
  • Disable the name suggestions in Tools/Options/TextEditor/C#/IntelliSense. That's what is causing this nonsense. Seems MS realized later that they flipped coders up by adding that feature that changes old behaviour greatly without giving them a way to disable it. Now there is such a checkbox. I nearly uninstalled this studio because of this lol. Not sure, may be it's a good feature, but i'm too used to Tab code snippets around, that I'm better without it.

    0 讨论(0)
提交回复
热议问题