Git源代码管理提供者热键 [英] Git Source Control Provider hotkeys

查看:160
本文介绍了Git源代码管理提供者热键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为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 这里是你必须在<$ em>中选择<$ em code>项目或文件 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.

这篇关于Git源代码管理提供者热键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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