我为Visual Studio 2010使用了 Git Source Control Provider 扩展,我想为Commit提供一个热键,但我无法使其工作。我想通过右击解决方案中的任意位置来定义键盘快捷方式,通过右键单击解决方案中的任意位置,选择Git-> Commit(带牛图标的那个,而不是TortoiseGit提供的那个)。
我为GitPlugin.Connect.GitExtensionsCommit设置了一个热键( Ctrl + G , Ctrl 全球使用(是的,我不得不禁用一些其他使用Ctrl + G的热键设置),但是每当我使用它时,我都会收到一条错误消息,指出该命令当前不是
如何为Git Source Control Provider设置热键?
解决方案我将Ctrl + \,Ctrl + K配置为快捷键(但您可以只要没有冲突就设置你自己。)
之后,如果选择任何项目/文件节点并点击快捷方式,它将触发提交。
catch 这里是你必须在中选择项目或文件 c $ c>解决方案资源管理器这是有道理的,因为否则,提供者不知道要提交什么。
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?
解决方案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 or file in solution explorer which makes sense because otherwise, the provider doesn't know what to commit.
发布评论