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

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

问题描述

我正在使用Visual Studio 2017 Enterprise 15.3.3版

I'm using Visual Studio 2017 Enterprise, Version 15.3.3

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

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 ..//以s开头,Intellisense建议使用"space","position"和"spacePosition"

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

我总体上喜欢此功能,但不喜欢代码段.使用代码片段时,我遇到了一个问题,即按Tab键(用于导航到下一个文字)后,文字名称会自动被IntelliSense替换.

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

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

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

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

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

我在Visual Studio Code中找到了针对同一问题的解决方案: stackoverflow文章,但不适用于Visual Studio

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

推荐答案

在工具/选项/文本编辑器/C#/IntelliSense"中禁用名称建议.这就是造成这种胡说八道的原因.似乎MS后来意识到,他们通过添加可以大大改变旧行为而又不给他们禁用方法的功能来增加了编码器.现在有一个复选框. 由于这个笑声,我差点把这个工作室卸载了.不确定,也许这是一个很好的功能,但是我也习惯于使用Tab键显示代码片段,如果没有它,我会更好.

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天全站免登陆