在Visual Studio中可以使用什么键盘快捷键来组织C#使用? [英] What keyboard shortcut is there to organize C# usings in Visual Studio?

查看:133
本文介绍了在Visual Studio中可以使用什么键盘快捷键来组织C#使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一种方法可以通过Visual Studio中的快捷方式来组织一个项目的一个或多个文件的C#使用(删除和排序,单独或一起使用)?

Is there a way to organize C# usings (remove and sort, in separate or together) via a shortcut in Visual Studio for one or more files of a project?

我知道可以通过选择

Edit > IntelliSense > Organize Usings > Remove and Sort

但是我想更快地做到这一点. 我正在使用Visual Studio 2013 Express进行 C#开发(尽管也想知道如何在较早的版本和其他版本中完成此操作).预先谢谢你.

but I want to do this much faster. I am using Visual Studio 2013 Express for C# development (wondering how this can be done in older & other versions too though). Thank you in advance.

推荐答案

转到工具=>选项=>环境=>键盘

Go to Tools => Options => Environment => Keyboard

输入要使用的组合键(单击按快捷键:文本框,按组合键,就像在编辑时执行组合键一样

Enter the key combination you want to use (click the Press shortcut keys: textbox, press your key combo as you would execute it while editing)

然后在显示包含以下内容的命令的文本框中输入"usings"

Then type "usings" in the Show commands containing: textbox

现在,您可以使用自己喜欢的命令将这些删除/排序的任何版本分配给组合键.

And now you can assign whichever version of these remove/sort usings commands that you like to the key combination.

这几乎适用于Visual Studio中的每个命令以及已安装的所有插件.只需键入命令名称中涉及的单词即可找到命令.分配!

This works for pretty much every command in Visual Studio, and from any addons you have installed. Just type a word involved in the command name to find the command. Assign away!

这篇关于在Visual Studio中可以使用什么键盘快捷键来组织C#使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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