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

查看:28
本文介绍了有什么键盘快捷键可以在 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?

我知道这可以通过选择一个文件的菜单来完成

I know that this can be done via the menu for one file by selecting

<代码>编辑 >智能感知组织使用 >删除和排序

但我想更快地做到这一点.我正在使用 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)

然后在显示命令包含:文本框

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

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天全站免登陆