如何在eclipse中的Team->Add命令中添加键盘快捷键
我希望在 Eclipse 中拥有 Team->Add 和 Team->Commit 的键盘快捷键。我正在使用 eGit。
我将它们添加到“首选项”->“常规”->“键”中,并且这些键显示在“团队”->“添加”和“团队”->“提交”旁边的菜单上。
然而,当我按下按键时似乎什么也没有发生。在第一个按键后会弹出一个小按键辅助窗口,并向我显示匹配的命令,其中包括“添加到 Git 索引”,但该文件未添加到 git 索引中。
更一般地说,我希望能够将当前项目提交到 git,而无需使用鼠标。
I would like to have keyboard shortcuts to Team->Add and Team->Commit in eclipse. I am using eGit.
I added them in Preferences->General->Keys and that works in that the keys show up on the menus next to Team->add and Team->commit.
However, when I press the keys nothing seems to happen. The little Key Assist window pops up after the first key and shows me the matching commands, with 'Add to Git index' included, but the file is not added to the git index.
More generally, I would like to be able to commit the current project to git without having to use the mouse.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
确保 Git 命令组可用。右键菜单栏空白处->自定义视角->指挥组可用性;确保选择了可用命令组中的“Git”条目。
Make sure that the Git command groups are available. Right-click a blank area of menu bar -> Customize perspective -> Command groups availability; make sure the 'Git' entry in the available command groups is selected.
当您在 Eclipse 中添加键盘快捷键时,您还会附加一个范围(Eclipse 术语中的“何时”字段)。确保将其设置为启动快捷方式时将使用的范围,例如“Java 编辑器”或更广泛的“在 Windows 中”。 (注意:我自己还没有机会对此进行测试,所以我可能找错了对象)。
When you add a keyboard shortcut in eclipse, you also have a scope attached to it (the "When" field, in Eclipse terms). Make sure that it's set to a scope that'll be in use when you fire the shortcut, like "Java editors" or the more broad "In Windows". (NB: I've not had a chance to test this myself, so I could be barking up the wrong tree).