Questions tagged [nano]

nano is a text editor from the GNU project; apply this tag if you are asking about features or functionality of the editor

Use this tag if you have a question about using nano.

Nano's home page is at: https://www.nano-editor.org, including a section on Documentation

149 questions
136
votes
8 answers

Long line wrapping in Nano

When editing an authorised_keys file in Nano, I want to wrap long lines so that I can see the end of the lines (i.e tell whose key it is). Essentially I want it to look like the output of cat authorised_keys So, I hit Esc + L which is the meta key…
codecowboy
  • 3,362
  • 7
  • 23
  • 29
94
votes
8 answers

Nano - jump to end of file

I have some long log files. I can view the last lines with tail -n 50 file.txt, but sometimes I need to edit those last lines. How do I jump straight to the end of a file when viewing it with nano?
payloc91
  • 2,269
  • 2
  • 9
  • 12
78
votes
5 answers

Is it possible to save as root from nano after you've forgotten to start nano with sudo?

A lot of the time I edit a file with nano, try to save and get a permission error because I forgot to run it as root. Is there some quick way I can become root with sudo from within the editor, without having to re-open and re-edit the file?
Kit Sunde
  • 4,394
  • 10
  • 30
  • 34
72
votes
3 answers

What does "XOFF ignored, mumble mumble" error mean?

While trying to save a file out of Nano the other day, I got an error message saying "XOFF ignored, mumble mumble". I have no idea what that's supposed to mean. Any insights?
nathangiesbrecht
  • 900
  • 1
  • 7
  • 12
50
votes
3 answers

How can I set the default editor as nano on my Mac?

I have vim as default editor on my Mac and every time I run commands on Mac terminal, it automatically opens "vim". How can I set up "nano" instead and make sure the terminal will open "nano" every time is needed?
g_tech
  • 603
  • 1
  • 5
  • 4
42
votes
7 answers

Is there line numbering for nano?

Is there a way to turn on line numbering for nano?
chrisjlee
  • 8,283
  • 16
  • 49
  • 54
36
votes
5 answers

Is there any way to install Nano on CoreOS?

CoreOS does not include a package manager but my preferred text editor is nano, not vi or vim. Is there any way around this? gcc is not available so its not possible to compile from source: core@core-01 ~/nano-2.4.1 $ ./configure checking build…
codecowboy
  • 3,362
  • 7
  • 23
  • 29
33
votes
3 answers

How to indent multiple lines in nano

Selecting lines in nano can be achieved using Esc+A. With multiple lines selected, how do I then indent all those lines at once?
52d6c6af
  • 441
  • 1
  • 4
  • 6
31
votes
1 answer

How to comment multiple lines in nano at once?

I can able to select multiple lines using Esc+A. After this, what shortcut(s) should I use to comment/uncomment the selected lines?
krkart
  • 535
  • 2
  • 5
  • 8
28
votes
3 answers

How to get rid of "nano not found" warnings, without installing nano?

Installed Debian Stretch (9.3). Installed Vim and removed Nano. Vim is selected as the default editor. Every time I run crontab -e, I get these warnings: root@franklin:~# crontab -e no crontab for root - using an empty one /usr/bin/sensible-editor:…
Teekin
  • 737
  • 8
  • 14
21
votes
1 answer

Nano Editor: Delete to the end of the file

When using GNU's Nano Editor, is it possible to delete from the actual cursor position to the end of the text file? My workaround for now: keep pressed CtrlK (the delete full line hotkey). But this method is not so confortable on slow remote…
Sopalajo de Arrierez
  • 6,281
  • 21
  • 60
  • 98
19
votes
2 answers

Find and replace "tabs" using search and replace in nano

How can I search and replace horizontal tabs in nano? I've been trying to use [\t] in regex mode, but this only matches every occurrence of the character t. I've just been using sed 's/\t//g' file, which works fine, but I would still be interested…
nath
  • 5,430
  • 9
  • 45
  • 87
17
votes
1 answer

How to show non printing characters in nano

Is there a way to show or toggle non printing characters like newline or tab in nano? At first let's assume the file is plain ascii.
sZpak
  • 349
  • 1
  • 4
  • 11
14
votes
1 answer

Is it possible to easily switch between tabs and spaces in nano?

Normally I want nano to replace tabs with spaces, so I use set tabstospaces in my .nanorc file. Occasionally I'd like to use nano to make a quick edit to makefiles where I need real tab characters. Is there any way to dynamically toggle…
jamesdlin
  • 838
  • 6
  • 19
12
votes
2 answers

Piped input to nano

Why does ls | nano - open the editor in Ubuntu but close the editor and save a file to -.save in CentOS? How can I get nano in CentOS to remain open when reading stdin?
1
2 3
9 10