Visual Studio-是否存在在选区周围插入括号的快捷方式? [英] Visual Studio - Is there a shortcut to insert parentheses around a selection?

查看:170
本文介绍了Visual Studio-是否存在在选区周围插入括号的快捷方式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在与Atom一起玩,我真的很喜欢如何选择一个表达式并按Shift+9在其外部插入()的方式.对于Haskell来说这很方便,对于F#我也希望如此.有捷径吗?

I am playing with Atom and I really like how I can select an expression and press Shift+9 to insert ( and ) outside it. This is convenient for Haskell and I would like the same for F#. Is there a shortcut for this?

推荐答案

这是Visual Studio 2017中的内置选项.转到工具>>选项,然后在选项对话框中导航,如下所示.将用括号启用环绕声"设置为真".所示示例使用了C ++的设置,但其他语言的处理过程应该与此类似.

This is an in-built option in Visual Studio 2017. Go to Tools >> Options, then navigate within the options dialog as shown below. Set "Enable Surround with Parentheses" to "True." The example shown uses settings for C++, but the process ought to be similar for other languages.

单击确定"后,只需键入第一个("

Once you click "OK," you should be able to automatically insert parentheses around any selected text by typing only the first "("

这篇关于Visual Studio-是否存在在选区周围插入括号的快捷方式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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