Is there line numbering for nano?
Adding set linenumbers
in /etc/nanorc
works for me in nano
version 2.7.1.
It also can be activated with -l
or --linenumbers
on the command line.
Toggle the line numbers from within nano with: M-#
in my case Alt+Shift+3.
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.
This was added on the 20th of October and was documented on the 22nd of October and has yet to make it into a release so compile it from source like so:
git clone git://git.savannah.gnu.org/nano.git;cd nano;./autogen.sh;./configure;sudo make install
Then add the following to your .nanorc:
set linenumbers
You can use ^# to turn line numbers on and off from within Nano. It's probably a bit buggy since it's recent and hasn't been tested by many people.