better-scroll

Improve user experience when scrolling window


Keywords
better, elisp, emacs, emacs-lisp, emacs-package, emacs-plugin, experience, improve, improvement, lisp, package, plugin, scroll, scrolling, user-experience
License
GPL-3.0

Documentation

Build Status MELPA MELPA Stable License: GPL v3

better-scroll

Improve user experience when scrolling window.

Normally scroll up/down will move the cursor to the window boundary corresponding to the direction on how the window scrolls. This package provides it's own scrolling functions that will preserve cursor's position.

Normal With Better Scroll

Usage

There are total 4 interactive functions in this package.

  • better-scroll-down
  • better-scroll-up
  • better-scroll-down-other-window
  • better-scroll-up-other-window

I will recommend to bind these function to global keys like the snippet below.

(define-key global-map (kbd "<prior>") #better-scroll-down)
(define-key global-map (kbd "<next>") #better-scroll-up)

(define-key global-map (kbd "S-<prior>") #better-scroll-down-other-window)
(define-key global-map (kbd "S-<next>") #better-scroll-up-other-window)

P.S. <prior> and <next> is corresponds to page up and page down key.

Aligment

You can set the cursor aligment by tweaking better-scroll-align-type variable.

(setq better-scroll-align-type 'center)  ; 'center or 'relative

Contribution

If you would like to contribute to this project, you may either clone and make pull requests to this repository. Or you can clone the project and establish your own branch of this tool. Any methods are welcome!