I am editing a large file. I would like the current line where the cursor is at to be always in the middle of the screen. Is this possible?
There is a mode for that:
centered-cursor-mode. It can be installed from MELPA.
It does not play well with a couple of modes, so this is my configuration:
;; keep the cursor centered to avoid sudden scroll jumps (require 'centered-cursor-mode) ;; disable in terminal modes ;; http://stackoverflow.com/a/6849467/519736 ;; also disable in Info mode, because it breaks going back with the backspace key (define-global-minor-mode my-global-centered-cursor-mode centered-cursor-mode (lambda () (when (not (memq major-mode (list 'Info-mode 'term-mode 'eshell-mode 'shell-mode 'erc-mode))) (centered-cursor-mode)))) (my-global-centered-cursor-mode 1)
As @Nsukami mentioned, an alternative is the built-in