| .gitignore | ||
| hybrid-linum-mode.el | ||
| README.org | ||
hybrid-linum-mode
hybrid-linum-mode is a minor mode that provides an alternative line number display to display-line-numbers-mode, which looks slightly more like vim's hybrid line numbering.
The main difference between this and (setq display-line-numbers 'relative) is that the current line number can be modified via current-line-number-display-function, and by default is the absolute line number which is left aligned (unlike display-line-numbers-mode, which right aligns all text).
relative-line-number-face and current-line-number-face are provided to customise the display.
Installation
hybrid-linum-mode.el can be placed in the emacs user directory (usually ~/.emacs.d) and then (load "hybrid-linum-mode") should be added to your init file to automatically load the package.
The mode can be automatically enabled, for example in prog-mode to automatically show line numbers in programming modes, by adding (add-hook 'prog-mode-hook #'hybrid-linum-mode) to your init file.
Straight
The following snippet can be used to install the package via Straight.
(straight-use-package
'(hybrid-linum-mode :type git
:host nil
:repo "https://git.cyan.sh/BirDt/hybrid-linum-mode.git"
:files ("*.el")))