Context: I have relative line numbers displayed in emacs. If there is a fold (for example: in org-mode), these relative numbers appear to "jump". For example if I'm on line 0 over a fold, emacs could show me that the next line visible is "50 lines" below me instead of 1 line below me.

The problem: This is causing issue with line jumping behavior. Say I want to type "50j" (in evil mode) to move 50 absolute lines down; if I do this, my cursor jumps 50 visible lines down, so that my cursor overshoots my target.

Question: Is there a way to either:

  1. Make line jumping absolute-relative as opposed to visible-relative (so that typing "50j" moves 50 absolute lines down, as opposed to 50 visible lines down)?
  2. Make relative line numbers along the side of the screen be visible-relative as opposed to absolute-relative?

EDIT: I'm running emacs 25 with spacemacs config, getting relative line numbers via dotspacemacs-line-numbers 'relative.

  • There are various ways to show line numbers. Please state how you are getting line numbers, and mention your Emacs release.
    – Drew
    Aug 4, 2017 at 20:09


Your Answer

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

Browse other questions tagged or ask your own question.