5

A full screenfull is too fast for me to follow; I'd prefer maybe a half screenfull or ~10 lines.

Can this be done?

Oliver Salzburg
  • 87,539
  • 63
  • 263
  • 308
Owen
  • 835

2 Answers2

2

I had taken @yole's answer and implemented all of the actions he had described in a separate plugin:

There is no way to control this through the settings. What you can do is write a plugin that performs scrolling in the way that you prefer. It's fairly easy: all you need to do is copy the existing PageUpAction/PageDownAction classes and the methods they call (EditorActionUtil.moveCaretPageUp/Down) to scroll by as much as you want.

This plugin implements new actions "Partial Page Up" and "Partial Page Down" which allow one to scroll a configurable size of screen definable in the usual IDEA settings dialog.

There's an installable version of the plugin in official JetBrains repository.

1

If you are on a Windows machine, you can use a simple Autohotkey script to remap page up and page down commands to scrolling 10 lines.

PgDn::Send {WHEEL_DOWN 3}

This (untested script) should send the simulate scrolling the wheel 3 times, which should scroll about 9 lines on default settings. You can easily set up a similar solution for page up, and alternatively send DOWN arrow commands, if the WHEEL_DOWN doesn't work as expected.

You can also make use of the #IfWinActive directive to only enable it for the active application.

If you are using another OS, I assume you can find some other hotkey/remap software that could more or less accomplish the same thing.

  • On Linux (which is what I am using) there may be a way to do this, too, but I am not sure how. The usual way of remapping keys through xkb makes it hard to produce multiple apparent keypresses in response to one actual keypress. – Owen Jul 06 '13 at 06:30
  • It seems that this may be doable via http://superuser.com/questions/613149/how-can-i-get-more-control-over-the-keyboard-layout-than-xkb-offers – Owen Sep 14 '13 at 04:16