1

I am using emacs for a few months now and it is going ok.

I want to know if there is a package out there which can help me move the screen instead of my cursor.

For example, if I move one line down(Ctrl n) then instead of the cursor going one line down I want the screen to scroll up on line. This way my cursor is always in the middle and the text moves instead of cursor.

I want this behavior because I think it will be easier on my eyes.

Is this possible? Any leads appreciated.

  • How about centered-cursor-mode? emacswiki.org/emacs/centered-cursor-mode.el How about using the mouse wheel? See also the commands scroll-up and scroll-down. The mouse wheel can be adjusted to scroll-up/down just one line or many lines at a time. – lawlist Jul 9 '17 at 15:23
1

I like these, although I only have the first two bound right now:

(defun kb-scroll-up-hold-cursor ()
  "Scroll up one position in file."
  (interactive)
  (scroll-up-command 1))

(defun kb-scroll-down-hold-cursor ()
  "Scroll down one position in file."
  (interactive)
  (scroll-up-command -1))

(defun kb-scroll-up ()
  "Scroll up one position in file, move cursor with the scroll."
  (interactive)
  (scroll-up-command -1)
  (forward-line -1))

(defun kb-scroll-down ()
  "Scroll down one position in file, move cursor with the scroll."
  (interactive)
  (scroll-up-command 1)
  (forward-line 1))

(bind-key "M-P"  'kb-scroll-up-hold-cursor)
(bind-key "M-N"  'kb-scroll-down-hold-cursor)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.