Visual Studio 2017:为 CodeSnippets 禁用 Intellisense [英] Visual Studio 2017: Disable Intellisense for CodeSnippets

查看:28
本文介绍了Visual Studio 2017:为 CodeSnippets 禁用 Intellisense的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Visual Studio 2017 Enterprise,版本 15.3.3

我看起来 IntelliSense 具有一些用于代码完成的新功能.此功能之一是,在编写类型时会自动建议字段名称.

SpacePosition s..//以 s 开头,Intellisense 建议space"、position"和spacePosition"

我总体上喜欢这个功能,但不喜欢代码片段.使用截断的代码我遇到了问题,即在按下选项卡(用于导航到下一个文字)后,文字的名称会自动替换为 IntelliSense.

在我的示例中,我想将属性命名为其他",然后在片段中跳转下一个文字.但是由于 IntelliSense,属性名称被替换为spacePosition".

有什么方法可以禁用代码片段中的 IntelliSense 功能?

我在 Visual Studio Code 中找到了相同问题的解决方案:因为这个哈哈,我几乎卸载了这个工作室.不确定,可能这是一个很好的功能,但我太习惯于 Tab 代码片段,没有它我会更好.

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 name is automatically suggested when a type is written.

SpacePosition s.. // starting with s, Intellisense suggest "space", "position" and "spacePosition"

I like this feature in general but not for code snippets. Using a code snipped I have the problem, that the name of a literal is automatically replaced by IntelliSense after pressing tab (which is used for navigate to the next literal).

In my example I want to name the property "other" and then jump the the next literal inside the snippet. But because of IntelliSense, the property name is replaced by "spacePosition".

Is there any way to disable the IntelliSense feature inside code snippets?

I found a solution for the same problem in Visual Studio Code: stackoverflow article but not for Visual Studio

解决方案

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.

这篇关于Visual Studio 2017:为 CodeSnippets 禁用 Intellisense的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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