Search code examples
visual-studiovisual-studio-2015resharperresharper-2016

Surround code block with curly braces?


Is there a shortcut to surround a given (selected) code block with curly braces?

VS 2015 + R# 2016.1


Solution

  • As an as an alternative to Patrick's answer (Ctrl+E, U, 7) you could also use the extended Alt+Enter -menu of ReSharper 9+.

    Alt+Enter, UP, UP, Enter, or

    Alt+Enter, "bl", Enter

    Screen

    Unfortunately, I don't know a way to bind this to a shorter hotkey.

    But if this is really important to you, you could try AutoHotkey.