full auto completion of switch blocks for enums as in native VS 2017? Follow
when I create a switch block for an enum value the standard auto completion in Visual Studio 2017 creates the whole block with case statements for every value in the enum. I love this features since I have to write switch blocks for enums over and over in the project.
With ReSharper enabled the auto completion only creates an empty switch block.
I know that ReSharper can fill in the missing case statements on request, just als native VS 2017 also can, but this is 3 more key presses and simply not as convenient.
Is there a way to get full autocompletion of switch blocks without disabling ReSharper's intellisense features alltogether?
Please sign in to leave a comment.
There's no way currently to enable this behavior in R++. We believe "Alt+Enter, Enter" to generate the missing cases is acceptable, since you do not always need all the branches and we prefer to not generate any redundant code that you'll have to delete later. You're welcome to file a feature request if you feel this feature is important to you.
You can also manually insert the VS snippet for "switch". Select "Edit | IntelliSense | Insert Snippet" (Ctrl+K, Ctrl+X in the default keyboard scheme) and complete "switch" in the "Insert Snippet" dropdown.
Thanks for the explanation.
I'll try to get accustomed to using [Ctrl]+[K], [Ctrl]+[X] for inserting the snippet. Time will tell if this works out for me.
[Alt]+[Enter], [Enter] unfortunately inserts the case statements with break on the same line. That would be even more work to fix everytime.