Git 源代码控制提供程序热键
我正在使用 Visual Studio 2010 的 Git Source Control Provider 扩展,并且我想设置一个热键用于提交,但我无法使其工作。我想为运行的任何命令定义一个键盘快捷键,方法是右键单击解决方案中的任意位置,选择“Git->Commit”(带有牛图标的那个,而不是 TortoiseGit 提供的那个)。
我已经为 GitPlugin.Connect.GitExtensionsCommit 设置了热键(Ctrl+G、Ctrl+C),要在全局范围内使用(是的,我必须禁用一些使用 Ctrl+G 的其他热键设置),但每当我使用它时,我都会收到一条错误消息,指出该命令当前不可用。
如何设置 Git 源代码控制提供程序的热键?
I'm using the Git Source Control Provider extension for Visual Studio 2010, and I'd like to set a hotkey for Commit, but I can't make it work. I'd like to define a keyboard shortcut for whatever command is run by right-clicking anywhere in my solution, selecting "Git->Commit" (the one with the cow icon, not the one provided by TortoiseGit).
I've set a hotkey for GitPlugin.Connect.GitExtensionsCommit (Ctrl+G, Ctrl+C), to be used globally (yes, I had to disable some other hotkey settings that used Ctrl+G), but whenever I use it I get an error message saying that the command is not currently available.
How do I set hotkeys for the Git Source Control Provider?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
经过一番尝试后,我终于能够让它工作了。
我将Ctrl+\、Ctrl+K配置为快捷方式(但你可以自己设置,只要不冲突)。
之后,如果您选择任何项目/文件节点并点击快捷方式,它将触发提交。
这里的问题是您必须在解决方案资源管理器中选择一个项目或文件> 这是有道理的,因为否则,提供者不知道要提交什么。
After playing around with this, I was able to get it working.
I configured Ctrl+\, Ctrl+K to be the shortcut (but you can set your own as long as there are no conflicts).
After that, if you select any project/file node and hit the shortcut, it'll trigger the commit.
The catch here is that you have to select a
project
orfile
insolution explorer
which makes sense because otherwise, the provider doesn't know what to commit.