I frequent the gnu.emacs.sources news group as one route to finding out about new packages. linenum.el came across the list recently. The package displays line numbers on the left side of your buffer. The author indicates that it is an alternative to setnu.el with the benefit that it works incrementally and can handle large files. It seems like one of those packages that is nice to have in your bag of tricks. Of course, you may just want the current line number in your modeline by using the M-x line-number-mode command. You can set it by default with the following line in your .emacs file.
(line-number-mode 1)
And in case you forgot (or didn’t know), M-g M-g (or M-g g) is the key binding for M-x goto-line in Emacs 22.
7 responses so far ↓
One of my officemates just pointed out to me that the goto-line key binding is only in Emacs 22. I will update the post. Thanks Andy.
Good tip! I didn’t know about the Emacs 22 keybinding. That’s pretty handy.
If you just want to know what line you are on occasionally you can ask, M-x what-line.
3 Free Mind » Blog Archive » linum.el: Yet another package for Emacs to display line number // Aug 29, 2007 at 3:39 pm
[...] setnu.el(??? setnu+.el) ?? wb-line-number.el ???????????? linum.el [...]
saginaw health mi covenant care saginaw michigan health covenant care
5 chenlevy's status on Thursday, 18-Jun-09 12:56:08 UTC - Identi.ca // Jun 18, 2009 at 12:56 pm
[...] http://www.emacsblog.org/2007/03/29/quick-tip-line-numbering/ is for #emacs what ``:set number`` is for [...]
6 line numbering in emacs (as in vi) // Jun 8, 2011 at 7:08 pm
[...] the department.) In vi you just use :set nu – the is a site that explains that this is possible http://emacsblog.org/2007/03/29/quic…ine-numbering/ It describes a linenum.el – and I can see the program, but don't understand how to install [...]
try the following link http://web.student.tuwien.ac.at/~e0225855/linum/linum.html it’s working for me.
Leave a Comment