问题
In compare editor there are buttons
- Next Difference
- Previous Difference
- Next Change
- Previous Change
I'd like to assign key bindings for Next Difference and Previous Difference buttons. However in preferences I see only Select Next Change and Select Previous Change commands (both in category Compare). How can I assign key bindings to buttons referring to differences?
My Eclipse:
Version: Indigo Service Release 2
Build id: 20120216-1857
回答1:
There are default shortcuts for these:
CTRL-. (next
) and CTRL-, (previous
)
回答2:
In Eclipse Mars, it is still the same process as moeTi explained. I am adding some details. To set custom keyboard shortcuts, go to:
- Open Window->Preferences
- General->Keys
Here's a list of the commands you would want and the associated mapping:
- Previous Difference (Select the previous difference in the comparison editor)
- Command 'Previous' in category 'Navigate'
- Next Difference (Select the next difference in the comparison editor)
- The command 'Next' in category 'Navigate'
- Copy Current Change from Right to Left (replace your code with theirs)
- The command 'Copy from Right to Left' in category 'Compare'
- Copy Current Change from Left to Right (generally not an option)
- The command 'Copy from Left to Right' in category 'Compare'
回答3:
Next Difference, Previous Difference:
- No key mapping (still in Eclipse Neon ) :(
Next Change, Previous Change:
- Set "When" to "Comparing in an Editor" worked for me.
来源:https://stackoverflow.com/questions/10177460/is-there-a-key-binding-for-next-difference-and-previous-difference-in-eclipse-co