GitHub - coldnew/linum-relative: display relative line number in the left margin...
source link: https://github.com/coldnew/linum-relative
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
README.md
linum-relative.el
display relative line number in emacs.
linum-relative lets you display relative line numbers for current buffer.
Installation
If you have melpa
and emacs24
installed, simply type:
M-x package-install linum-relative
And add the following to your .emacs
(require 'linum-relative)
Setup & Tips
The non-interactive function linum-on (which should already be built into recent GNU Emacs distributions), turns on side-bar line numbering:
(linum-on)
and alternatively, by using command:
M-x linum-relative-mode
Relative line numbering should already be enabled by default (by installing this package), following linum-on or enabling linum-mode. One can also use the linum-relative-toggle interactive function to switch between relative and non-relative line numbering:
M-x linum-relative-toggle
Backends
By default, linum-relative use linum-mode as backend, since linum-mode is based on emacs-lisp, you may have performance issue on large file.
Since linum-relative 0.6, if you also use emacs version 26.1 or above, you can setup linum-relative-backend
to make linum-relative-mode use display-line-number-mode
as backend, which is implement in C so the performance is really nice.
However some linum-relative's customize function may not work propely.
Here's how to use display-line-number-mode
as backend:
;; Use `display-line-number-mode` as linum-mode's backend for smooth performance (setq linum-relative-backend 'display-line-numbers-mode)
Function Documentation
(linum-relative-in-helm-p)
Return non nil when in an helm session.
(linum-relative-on)
Turn ON linum-relative.
(linum-relative-off)
Turn OFF linum-relative.
(linum-relative-toggle)
Toggle between linum-relative and linum.
Recommend
-
49
margin属性概述margin是CSS层叠样式表中用来规定围绕在元素边框周围空白区域范围的属性.该接受任何长度单位,可以是像素、英寸、毫米或em。相关属性margin可以单独改变元素的上,下,左,右边距。也可以一次改变所有的属性。属性描述margin简写属性。在一个声明中...
-
55
byzhangxinxu from https://www.zhangxinxu.com/wordpress/?p=8132 本文可全文转载,个人博客无需授权,只要保留原作者、出处以及文中链接即可,任何网站均可摘要...
-
41
The problem: you click a jump link like <a href="#header-3">Jump</a> which links to something like <h3 id="header-3">Header</h3> . That’s totally fine, until you have a...
-
16
We should ban margin from our components. Hear me out. Margin breaks component encapsulation. A well-built component should not affect anything outside itself. Margin makes reusability harder. Good componen...
-
26
In CSS margin-collapsing refers to the fact that the margins that are next to each other are colliding… but only vertically. Yeah, it's one of those brainfuck
-
32
Avoid CSS margin confusionWednesday, April 4th 2018I wrote this in a comment on GitHub the other day and realised it's something I've been doing subconsciously for ages that makes CSS easier for me...
-
7
New issue Run rustdoc doctests relative to the workspace #9105 Conver...
-
11
Copy link Collaborator rust-highfive
-
5
Emacs multi-file develop/run-from-of-source routines The rational behind module is to be able to write small Emacs functions or modules in a larger multi-file Emacs package and facilitate running from the source tree without having t...
-
6
Relative date computation and formatting This package allows to format the difference between two dates according to the value of their difference (expressed in seconds) or a symbolic relationship between the two dates (e.g. ‘today)....
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK