Surround code block with curly braces?

后端 未结 6 981
Happy的楠姐
Happy的楠姐 2021-02-18 22:53

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

VS 2015 + R# 2016.1

6条回答
  •  迷失自我
    2021-02-18 23:37

    using visual studio 2017 with resharper 2017, it seems like the way to do this would be to hit CTRL+E and either: Up,Up,Enter , or start typing the shortcut name (swb will match Surrond With block and make you happy.

    I'm not 100% sure if this is VS or RS though, since the CTRL+E is VS 2017.
    On the plus side, you can easily search for shortcuts and find new gems once you've hit the CTRL+E combo.

    Update
    This is part of Resharper. I'm using 2017.1.1 ultimate. You can find more surround with templates on their page for live templates.

提交回复
热议问题