Tab Behavior Intellisense Change Options
A product like Resharper has many settings, and I cannot find the right settings to get the exact behavior I want from it.
The behavior I'm trying to change is as follows: Suppose that endresult I want
but now the string
As you expect, I will start typing:
and after the tab i get this
but I wanted him to become
Does anyone know how I can change the settings of Resharper so that my desired behavior is implemented? Thanks.
EDIT: Note that the tab performs the desired behavior in standard VS Intellisense.
In this particular case, here is what you should do:
- Go to ReSharper> Options> Environment> IntelliSense> IntelliSense Behavior and set Automatically insert parentheses after completion to open only.
- Now, with the
SomeMethod()
right in front ofSomeMethod()
, typeMath.Ab
and fill inAbs
with Enter, as Rob H. suggested correctly. You end up withMath.Abs(SomeMethod();
- Finally, press Ctrl + Shift + Enter to call up the Completion Statement , which in this case inserts the required bracket at the end of the statement and places the carriage on the next line.
Keep in mind that this may not be the optimal solution, provided that you probably have many other options for code completion that may conflict with such settings.
If such code modification is required in several places, you should create a search and replace the template .
Including Enter instead of Tab will be inserted without overwriting, although in the end you will get
Math.Abs()SomeMethod();