swiss-move

Introduction

This can be improved if subsequent keystrokes would reduce the amount of lines scrolled.

Swiss Movement?

Yes, I call this Swiss Movement. It works as follows.

Let's assume that you are positioned somewhere near the TOP of a quite large file and that you want to move downward quite a bit. Hitting the appropriate button to call swiss-move-line-down will bring you to a line which is somewhere near the middle between your current position and the end of the file.

Doing the same again, will bring you forward to the new middle of your new position and the end of the file. You could hower decide that you moved past the point you want to reach. Then using the swiss-move-line-up-function will bring you to the middle of the range between your last position and your current position.

This way you can do quick, large jumps and adjust your position in a series of smaller getting jumps, in the end allowing for one-line-at-a-time adjustment. This may sound confusing, but

  1. It is also explained with simple ASCII-art in the docstring of swiss-move-line
  2. You'd best try it and see whether you can get used to it or not. I really think that this can improve your every day life in XEmacs if it feels good for you.

Installation

Download: swiss-move.el

Put into your init file (.emacs or .xemacs/init.el or personal.el):

     (require 'swiss-move)
     (global-set-key '[(shift prior)] 'swiss-move-line-up)
     (global-set-key '[(shift next)]  'swiss-move-line-down)
     

that's it.

Emacs Version

This is NOT working in GNU Emacs.

The function line-number is not working (at least in my pretty old GNU Emacs).

Notes

I found this a rather good idea but don't use it anymore. It simply does not fit into my way of thinking. But that's what (X)Emacs is about: think it, code it, try it and then use it or not ;-)