像 Resharper 这样的产品有很多设置,但我似乎无法找到正确的设置来获得我想要的确切行为。
我试图改变的行为是这样的:
假设我想要的最终结果是
但当前行是
正如您所期望的,我开始输入:
并在选项卡后我得到这个
但我希望它变成
有谁知道如何更改 Resharper 设置以实现我想要的行为?
谢谢。
编辑:请注意,该选项卡确实在默认 VS Intellisense 中执行所需的行为。
A product like Resharper has many settings, and I can't seem to find the right settings to get the exact behavior I desire from it.
The behavior I am trying to change is this:
Suppose the endresult I want is
but the line currently is
As you expect I start typing:
and after a tab I get this
but I wanted it to become
Does anyone know how I can change the Resharper settings in such a manner that my desired behavior is realized?
Thank you.
EDIT: Note that tab does perform the desired behavior in the default VS Intellisense.
发布评论
评论(2)
在这种特殊情况下,您应该执行以下操作:
SomeMethod()
之前插入脱字符号,输入Math.Ab
,然后按 Enter 完成Abs
,正如 Rob H 所正确建议的那样。您最终会得到Math.Abs(SomeMethod();
请记住,如果您可能有很多其他的代码完成用法,如果需要进行多次类似的代码修改,则这可能不是最佳解决
。地方,您应该创建一个搜索和替换模式 相反。
In this particular case, here's what you should do:
SomeMethod()
, type inMath.Ab
, and completeAbs
with Enter, as correctly suggested by Rob H. You'll end up withMath.Abs(SomeMethod();
Keep in mind though that this might not be the optimal solution provided that you probably have plenty of other usages of code completion that could conflict with this kind of settings change.
If that kind of similar code modification is required in multiple places, you should possibly create a search and replace pattern instead.
按 Enter 键而不是 Tab 键将插入而不覆盖,尽管最终会得到
Hitting Enter instead of Tab will insert without overwriting, although you then end up with