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

enter image description here

but now the string

enter image description here

As you expect, I will start typing:

enter image description here

and after the tab i get this

enter image description here

but I wanted him to become

enter image description here

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.

+7
source share
2 answers

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 of SomeMethod() , type Math.Ab and fill in Abs with Enter, as Rob H. suggested correctly. You end up with Math.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 .

+8
source

Including Enter instead of Tab will be inserted without overwriting, although in the end you will get

 Math.Abs()SomeMethod(); 
+4
source

All Articles