0

I want something like:

(setq display-line-numbers-type 'mixed)

Which count wrapped line as "relative", and count folded line as "visual"

Is there any way to achieve this?


Say I have a file with contents:

first line
second line is so long that need to be wrapped
* third line is a title
cat is cat
* fifth line is a title
dog is dog

  • When (setq display-line-numbers-type t)
1 first line
2 second line is so long that need to be
  wrapped
3 * third line is a title
5 * fifth line is a title
  • When (setq display-line-numbers-type 'relative)
0 first line
1 second line is so long that need to be
  wrapped
2 * third line is a title
4 * fifth line is a title
  • When (setq display-line-numbers-type 'visual)
0 first line
1 second line is so long that need to be
2 wrapped
3 * third line is a title
4 * fifth line is a title
  • However, I want this behavior:
0 first line
1 second line is so long that need to be
  wrapped
2 * third line is a title
3 * fifth line is a title
1
  • 1
    The question is maybe understandable, but a little more detail might help...
    – Drew
    Aug 21 at 5:29

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.