如何使用Visual Studio + ReSharper禁用不良的自动完成功能? [英] How to disable undesirable auto-complete with Visual Studio + ReSharper?

查看:127
本文介绍了如何使用Visual Studio + ReSharper禁用不良的自动完成功能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Visual Studio 2010和ReSharper 5.

I'm using Visual Studio 2010 and ReSharper 5.

我在.cs文件的顶部定义它.

I define this at the top of a .cs file.

#if X86
using size_t = System.Int32;
#else
using size_t = System.Int64;
#endif

然后我可以使用size_t并知道它是一个本机整数,如果将其编译为32位程序集,则为32位,如果将其编译为64位程序集,则为64位. (对于好奇的人,替代方案总是使用Int64,或者在运行时在IntPtr.Size == 4上分支,并具有两个版本的代码.我更喜欢这种解决方案.)

Then I can use size_t and know that it is a native integer, 32 bits if compiled as a 32 bit assembly, and 64 bits if compiled as a 64 bit assembly. (for those that are curious, the alternatives are always use Int64, or branch at runtime on IntPtr.Size == 4 and have two versions of the code. I prefer this solution.)

但是,如果我键入size_t并按空格键,它将被自动转换为Int64(如果定义了X86,则转换为Int32).显然这是不可取的.

However, if I type size_t and hit space, it will be automatically converted to Int64 (or Int32 if X86 is defined). Obviously that's undesirable.

我进入了ReSharper选项,然后转到Environment \ Intellisence \ Completion行为,并禁用了使用以下命令自动完成单个项目"下的所有复选框.

I went into ReSharper options and went to Environment \ Intellisence \ Completion behavior and disabled all the checkboxes under "Automatically complete single item with:".

它仍然发生,还有什么我可以尝试的吗?

It still happens, is there anything else I can try?

推荐答案

我遇到了类似的问题(使用VS2013和Resharper 8.2).

I ran into a similar issue (using VS2013 and Resharper 8.2).

要停止对每个空格"命中的不良自动补全,我必须在VS和R#选项中都对空格"禁用IntelliSense完成:

To stop the undesirable auto-completion on every "space" hit, I had to disable IntelliSense completion on "space" both within VS and R# options:

  1. VS>工具>选项>文本编辑器> C#> IntelliSense> 通过按空格键提交"复选框
  2. VS> Resharper>选项>环境> IntelliSense>完成字符> C#在空间上完成"复选框
  1. VS > Tools > Options > Text Editor > C# > IntelliSense > "Committed by pressing the space bar" checkbox
  2. VS > Resharper > Options > Environment > IntelliSense > Completing Characters > C# "Complete on space" checkbox

干杯!

这篇关于如何使用Visual Studio + ReSharper禁用不良的自动完成功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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