docs/faq: revise how to change line numbers
This commit is contained in:
parent
fcbd91fc0d
commit
a814998a75
1 changed files with 16 additions and 13 deletions
29
docs/faq.org
29
docs/faq.org
|
@ -709,11 +709,6 @@ e.g.
|
||||||
** How do I change the style of line-numbers (or disable them altogether)?
|
** How do I change the style of line-numbers (or disable them altogether)?
|
||||||
Doom uses the ~display-line-numbers~ package, which is built into Emacs 26+.
|
Doom uses the ~display-line-numbers~ package, which is built into Emacs 26+.
|
||||||
|
|
||||||
#+begin_quote
|
|
||||||
This package has been backported for Emacs 25 users, but is powered by =nlinum=
|
|
||||||
there (which will be removed when we drop 25 support).
|
|
||||||
#+end_quote
|
|
||||||
|
|
||||||
*** Disabling line numbers entirely
|
*** Disabling line numbers entirely
|
||||||
#+BEGIN_SRC elisp
|
#+BEGIN_SRC elisp
|
||||||
(setq display-line-numbers-type nil)
|
(setq display-line-numbers-type nil)
|
||||||
|
@ -724,16 +719,24 @@ there (which will be removed when we drop 25 support).
|
||||||
|
|
||||||
*** Switching to relative line numbers (permanently)
|
*** Switching to relative line numbers (permanently)
|
||||||
To change the style of line numbers, change the value of the
|
To change the style of line numbers, change the value of the
|
||||||
~display-line-numbers-type~ variable. It accepts =t= (normal line numbers),
|
~display-line-numbers-type~ variable. It accepts the following values:
|
||||||
='relative= (relative line numbers), ='visual= (relative line numbers in screen
|
|
||||||
space) and =nil= (no line numbers).
|
|
||||||
|
|
||||||
You'll find more precise documentation on the variable through =SPC h v
|
#+begin_example
|
||||||
display-line-numbers-type= or =C-h v display-line-numbers-type=.
|
t normal line numbers
|
||||||
|
'relative relative line numbers
|
||||||
|
'visual relative line numbers in screen space
|
||||||
|
nil no line numbers
|
||||||
|
#+end_example
|
||||||
|
|
||||||
#+begin_quote
|
For example:
|
||||||
The ~'visual~ option is unavailable in Emacs 25.
|
|
||||||
#+end_quote
|
#+BEGIN_SRC elisp
|
||||||
|
(setq display-line-numbers-type 'relative)
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
You'll find more precise documentation on the variable through =<help> v
|
||||||
|
display-line-numbers-type= (=<help>= is =SPC h= for evil users, =C-h=
|
||||||
|
otherwise).
|
||||||
|
|
||||||
*** Switching the style of line numbers (temporarily)
|
*** Switching the style of line numbers (temporarily)
|
||||||
Use ~M-x doom/toggle-line-numbers~ (bound to =SPC t l= by default) to cycle
|
Use ~M-x doom/toggle-line-numbers~ (bound to =SPC t l= by default) to cycle
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue