Reputation: 1228
simple eclipse question: is there a way i can make the 'down' key move to the end of the line (like the 'end' key binding) IF im editing the last line of the file (so it continues to behave like before, if its not the last line of the file)?
pretty much like visual studio works, move up and down lines if its not the last line, but acts like 'end' if its the last line. thanks.
Upvotes: 2
Views: 608
Reputation: 1323953
Not with the eclipse as it is currently distributed: a command like "Line Down", associated to the ↓ key, will always move down the lines, not jump at the end of one.
You would need to define your own keyboard shortcut, like the one describe in this Eclipse wiki entry, associated to your own key-binding configuration. It would be similar to:
<extension
point="org.eclipse.ui.bindings">
<key
commandId="org.eclipse.ui.examples.contributions.view.edit"
contextId="org.eclipse.ui.examples.contributions.view.context"
sequence="ARROW_DOWN"
schemeId="org.eclipse.ui.examples.contributions.scheme">
</key>
</extension>
See also the help page.
then you would run your patched version of eclipse, with the relevant action taken when ARROW_DOWN is pressed.
Upvotes: 1