如何向 Visual Studio 添加自定义命令?

发布于 2024-11-16 07:54:51 字数 81 浏览 5 评论 0原文

我经常使用一个外部命令 - 基本上是启动一个批处理文件。我想在 IDE 中添加一个工具栏按钮(可能还有键盘快捷键)。有没有简单的方法可以做到这一点?

There's an external command I'm using constantly - basically launching a batch file. I'd like to put a toolbar button (and possibly keyboard shortcut) for this into the IDE. Is there an easy way to do that?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

山人契 2024-11-23 07:54:51

首先,通过选择“工具”、“外部工具”并填写对话框,向“工具”菜单添加一个项目,如下所示:

调出工具自定义,点击底部的键盘按钮,找到合适的外部工具编号:

First, add an item to your Tools menu by choosing Tools, External Tools, and filling out the dialog, like this:

enter image description here

Then bring up Tools Customize, click the Keyboard button at the bottom, and find the appropriate external tool number:

bind to a key

挥剑断情 2024-11-23 07:54:51

VS 中配置的所有外部命令都可以通过“工具”>“自定义”菜单添加到工具栏或菜单中,作为“外部命令##”。您只需要知道哪个数字对应于您配置的特定命令。我相信它是按照外部命令列表中的条目顺序排列的。

同样,您可以在“选项”>“环境”>“键盘”的命令列表中找到这些名称,并以这种方式为您的命令分配快捷方式。

All the configured external commands in VS are available to add to a Toolbar or Menu through the Tools>Customize menu as "External Command ##". You just need to know which number corresponds to the particular command you've configured. I believe it is in order of entry in the external commands list.

Similarly, you can find those names in the commands list in Options>Environment>Keyboard and assign a shortcut to your command that way.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文