为什么 Resharper intellisense 会替换我的代码?
使用 Resharper 6.1,当我输入类似... widget.PropertyA
然后将光标放在小部件符号前面,如下所示...
|widget.PropertyA
并开始输入另一个符号,R# intellisense 弹出。如果我选择建议的符号,则 R# 会用我新选择的符号替换小部件符号。
我可以看到这有时可能很有用,但绝大多数时候,我只是想在小部件前面输入更多代码,并且不希望它被替换。有谁知道这种行为是否可以配置?
谢谢。
With Resharper 6.1, when I type something like...
widget.PropertyA
and then put my cursor in front of the widget symbol like this...
|widget.PropertyA
and start typing another symbol, R# intellisense pops up. If I choose a suggested symbol, then R# replaces the widget symbol with my newly chosen symbol.
I can see how this might be useful at times, but the vast majority of the time, I just want to type more code in front of widget and don't want it to be replaced. Does anyone know if this behavior is configurable?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我不相信它是可配置的。 Tab 似乎会覆盖代码。它甚至会突出显示将被替换的代码段。
不要按 Tab 键来选择符号,而是使用 Enter 键。它将插入新代码而不覆盖现有代码。
I don't believe it is configurable. It seems to be by design that Tab overwrites code. It will even highlight the segment of code that would be replaced.
Instead of hitting Tab to select your symbol, use Enter instead. It will insert the new code without overwriting the existing code.
转到
IntelliSense ->在 ReSharper 选项中完成字符
。在该菜单的顶部,您可以使用 Enter 和 Tab 键进行插入或替换。Go to
IntelliSense -> Completing Characters
in your ReSharper options. At the top of that menu you can whether the Enter and Tab keys insert or replace.您真正能做的唯一一件事就是在开始输入之前插入一个额外的空格。您可以在JetBrains 的错误跟踪器上请求更改。如果你这样做,请告诉我,我会投票支持它!
The only thing you can really do is to insert an extra space before you start typing. You could request that it be changed on JetBrains' bug tracker. Let me know if you do and I'll vote for it!