Questions tagged [nano]

GNU nano is an open source, curses-based text editor for Unix systems. It is a clone of [tag:pico], the proprietary Pine e-mail client editor.

Nano is a simple, small, lightweight text editor for written in . It was created in 1999 under the name TIP ("this isn't pico"). It was renamed to avoid conflit with the tip command in 2000 and officially joined the GNU project in 2001.

Nowadays, nano supports interaction through mouse, syntax highlight, -based search, customization of key bindings and (experimental) undo/redo support. More about it can be read in its homepage.

295 questions
21
votes
4 answers

Error opening terminal: xterm-256color

When I try to nano something on my server I'm getting this error "Error opening terminal: xterm-256color." that I've never seen before, and on top of that nano used to work fine last week. Even when I use vi, the file will open but I can't…
GiH
  • 14,006
  • 13
  • 43
  • 56
19
votes
5 answers

Nano insert newline in search and replace

Basically, I need to doublespace a part of text. I know I can do it with: sed G but it would be great if I could do it directly in Nano. I tried to search for the end of line ($) and then replace it with things like \n or [:newline:] but it…
Tom Karger
  • 305
  • 1
  • 2
  • 6
19
votes
2 answers

Git commit -a opens GNU nano 2.2.6 How should I change it to open Vim instead?

I am trying to add a commit message to my changes using git commit -a OR just plain git commit this somehow opens GNU Nano 2.2.6 editor and I am not at all comfortable with it. So the question is : How can I modify my settings so that it…
Ketan Deshmukh
  • 678
  • 1
  • 5
  • 9
18
votes
9 answers

What is the benefit of using things such as emacs, vim, and nano over any other IDE or text editor?

From what Ive seen. emacs etc.. run in terminal. Is there any benefit to this? It seems that it would be more of a hassle to write and organize things. I'm not trying to be subjective I literally know nothing of emacs, vim, nano etc.. and would like…
Devan Buggay
  • 2,717
  • 4
  • 26
  • 35
18
votes
5 answers

Console editor: something between VIM and nano?

I used vim for a long time, but switched to Sublime Text last year for most of my programming work. Now, every time I have to make use of a console editor (mostly over ssh), I feel extremely uncomfortable with vim. The shortcuts and commands have…
salezica
  • 74,081
  • 25
  • 105
  • 166
16
votes
5 answers

bash: nano: command not found at Windows git bash

I am using git version 2.7.0.windows.1 on a windows pc, I used the following command: $ nano README which results me: bash: nano: command not found Now how can I install nano text editor to git bash?
Rubel Hassan
  • 186
  • 1
  • 1
  • 9
16
votes
2 answers

Nano colors spaces and tabs

When I use nano to edit my C file it shows all of the spaces or tabs in green coloring. I thought this may have been an issue with "whitespace display" and tried enabling and disabling it but it didnt work. I have also tried uninstalling and…
user2913690
15
votes
2 answers

Nano - File already being edited - How do I switch to the open file?

I have a tendency to miss-type while trying to Ctrl-X to exit nano. Every now and then I'll try to re-open the file and get the Nano "File xxx is being edited". How do I switch back to the open file? And also, what am I miss-typing to cause this to…
Tksd
  • 151
  • 1
  • 1
  • 3
13
votes
7 answers

How to turn OFF (or at least override) syntax highlighting in nano via ~/.nanorc?

I am struggling finding a clear answer on disabling or overriding the color settings for the nano editor. By default color syntax highlighting is enabled on my system. Clicking ALT+Y disables this, which is exactly what I want my default to be. Any…
seanomlor
  • 973
  • 1
  • 10
  • 23
11
votes
3 answers

How to make auto indention in nano while programming in python in linux?

I am a beginner programmer as well as linux user. Before, I was using windows and the python IDLE was so good. I need not needed to press tab button after the "If" statement or any other loops. Now, I am using Linux and started to write programs…
Sugam Adhikari
  • 131
  • 1
  • 1
  • 6
11
votes
2 answers

How to set nano up for git commit messages with line length limits

I use nano for git commit messages. Short summary (<=50 chars) plus a new line before the description is relatively straightforward to stick to. However, when it comes to wrapping at 72 chars in the description body I just go off what seems to look…
bcmcfc
  • 25,966
  • 29
  • 109
  • 181
11
votes
2 answers

Number pad issues when using a remote 'nano' instance in PuTTY

I'm using PuTTY on an old Windows laptop to communicate with Ubuntu. When using the terminal, everything is fine and I can use the numpad normally. However, when I open anything in nano, all these keys have functions instead of numbers. I did a…
Grey Mahagone
  • 149
  • 1
  • 4
10
votes
5 answers

Nano - disable confirm on save?

I use nano every day and I really hate when it asks every time to "save modified buffer? (yes/no)". How can I disable this?
tuomas-p
  • 141
  • 7
10
votes
1 answer

nano editor line breaks

I am trying to learn nano installed on my server (ubuntu 1204), but the problem is whenever I open a file in nano editor it opens the file (say a shell script) as one big line rather than with line breaks which fit the screen. Is it possible to open…
JohnJ
  • 6,736
  • 13
  • 49
  • 82
10
votes
1 answer

Single line create file with content

The OS is Ubuntu. I want to create file.txt in /home/z/Desktop where the content of the file is some text here. The first and usual way is run nano /home/z/Desktop/file.txt and type some text here. after that, press ctrl+x, pressy followed by…
apasajja
  • 576
  • 2
  • 6
  • 20
1
2
3
19 20