How to add a keyboard shortcut to the Team->Add command in eclipse
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 u开发者_如何学运维p 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.
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.
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).
精彩评论