1
votes

When navigating in Eclipse editor I use two possibilities to scroll text:

  • Shortcut "Ctrl + cursor down" (keyboard arrow key) -> scroll lines, but the cursor stays at same line
  • "Cursor down" with the keyboards arrow keys -> cursor moves to last line of visible editor, then the text starts scrolling

Is there a combination of both? I use Ctrl + cursor down extensively for good overview, but when I find the line to edit, I have to set the cursor to the line again (with the mouse).

2
what you mean with "cursor down"? do you mean scroll down with mouse wheel?Luca Davanzo
No, what I mean is I use the arrow keys / cursor movement keys of the keyboard, I have corrected it in the post.katana0815
no way.. alternative is "shift+ctrl+down"Luca Davanzo

2 Answers

1
votes

I have created an Eclipse plug-in which adds a command for this.

It is named Laid Editor Utilities and can be installed from the plug-in update site:

https://bitbucket.org/lii/laid_language_tools/src/master/se.lidestrom.laid.update_site/

The command is named Scroll With Caret Line Up / Down. By default it has the keyboard shortcuts Ctrl + Alt + C U/D (it's best to to change this to something more convenient).

The plugin also contains some other new editor actions, see project page for more information.

0
votes

IMHO there is no such short cut. In fact how editor should know which line you want to edit while scrolling, is it the first visible line or the last or in between?

Closely you can use the short cut key Ctrl + L to jump to a given line, as you aleady holding the Ctrl key while scrolling, just press L and type the line number you want to be in and press OK. Then the caret will be placed on the line you want to edit.