用花括号包围代码块? [英] Surround code block with curly braces?

查看:27
本文介绍了用花括号包围代码块?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有使用花括号将给定(选定)代码块括起来的快捷方式?

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

VS 2015 + R# 2016.1

VS 2015 + R# 2016.1

推荐答案

作为 Patrick 答案的替代 (Ctrl+E, U7) 您还可以使用 ReSharper 9+ 的扩展 Alt+Enter - 菜单.

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+EnterUPUPEnter

Alt+回车, "bl", 回车

不幸的是,我不知道如何将其绑定到较短的热键.

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

但如果这对您来说真的很重要,您可以尝试使用 AutoHotkey.

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

这篇关于用花括号包围代码块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆