unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Anast Gramm <anastasis.gramm2@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Relative line numbers (vim like)
Date: Fri, 18 Nov 2016 21:11:59 +0000	[thread overview]
Message-ID: <20161118211159.tkrsyk2y2qifjd3g@gmail.com> (raw)

Hello,

I was looking for a way to make linum mode like the relative numbers in
some vim videos I have seen, since it makes it very easy to do some stuff
really quick!

I found this (the first answer)
http://stackoverflow.com/questions/6874516/relative-line-numbers-in-emacs
and it pretty much works as expected, but I want one thing to change.
Instead of showing 0 at the current line I want to show the
actual line number.

I figured I could use what-line to get "Line %d" as a result
and then split it and the the 2nd half with the number and use this.

I don't know lisp, so I can't do this!

Any help would be appreciated!



             reply	other threads:[~2016-11-18 21:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-18 21:11 Anast Gramm [this message]
2016-11-19  2:33 ` Relative line numbers (vim like) Arun Isaac

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161118211159.tkrsyk2y2qifjd3g@gmail.com \
    --to=anastasis.gramm2@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).