为什么 Resharper intellisense 会替换我的代码?

发布于 2025-01-01 16:21:48 字数 267 浏览 1 评论 0原文

使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

西瑶 2025-01-08 16:21:48

我不相信它是可配置的。 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.

半葬歌 2025-01-08 16:21:48

转到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.

橪书 2025-01-08 16:21:48

您真正能做的唯一一件事就是在开始输入之前插入一个额外的空格。您可以在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!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文