Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Is there a way to turn on line numbering for nano?

share|improve this question
add comment

2 Answers

up vote 4 down vote accepted

The only thing coming close to what you want is option to display your current cursor position. You activate it by using --const (manpage: Constantly show the cursor position) option or by pressing AltC on an open text file.

share|improve this answer
    
Good answer. The --const argument is the same as -c. Use it to open the file like this: nano -c filename . Also, to make it permanent, include the 'set const' option in your ~/.nanorc file, which may not exist until you create it. –  MountainX Feb 2 '12 at 2:24
add comment

Nano is by design a very simple editor with few features. If you start wishing for anything beyond basic edition, nano isn't the right tool. Emacs is a very powerful editor; to switch line numbers on, type M-x linum-mode. If Emacs scares you and you want a text mode editor, consider Joe, where line numbers are switched on with the -linums option.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.