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
2
votes
2 answers

Cannot Launch Interactive Program While Piping to Script in Python

I have a python script that needs to call the defined $EDITOR or $VISUAL. When the Python script is called alone, I am able to launch the $EDITOR without a hitch, but the moment I pipe something to the Python script, the $EDITOR is unable to launch.…
Eric Pruitt
  • 1,825
  • 3
  • 21
  • 34
2
votes
1 answer

Why am I able to write to and read a tempfile even after closing it?

I was experimenting with opening text editors from my python script and I noticed something that apparently contradicts my understanding of the documentation of tempfile. My experiment started out with Alex Martelli's answer. My code - import…
jar
  • 2,646
  • 1
  • 22
  • 47
2
votes
1 answer

How to use regex capture group inside a .nanorc file?

How do I use a regex capture group inside a .nanorc file in combination with the color option? The Nanorc docs describe a color option, used to create syntax highlighting. color fgcolor,bgcolor regex For the currently defined syntax, display all…
GrayedFox
  • 2,350
  • 26
  • 44
2
votes
2 answers

Visudo not working anymore, what can I do?

So... I accidentally opened up visudo by typing vi visudo and at the same time I also prefer nano so I just naturally pressed ctrl+x to exit, then didn't realize right away that I was in vi (yes i'm slow haha) and kept trying :P... anyway, I…
GiH
  • 14,006
  • 13
  • 43
  • 56
2
votes
1 answer

Editing meta shortcut on nano text editor

Is there any option to change the meta M- shortcut on nano text editor? Im working with a Mac, and I wanted to change the meta shortcut for comfort reasons. I'm actually using the esc key but will love to change it to my preference.
David
  • 97
  • 1
  • 6
2
votes
1 answer

Anaconda (Windows) alternative to nano?

So I've been following this tutorial to download Keras with a Tensorflow backend: https://github.com/antoniosehk/keras-tensorflow-windows-installation It has gone fairly smoothly, and I'm only stuck for a stupid reason on the final step. It asks me…
Tim
  • 315
  • 4
  • 23
2
votes
1 answer

Ubuntu how to combine multiple text files into one with terminal

I want to combine multiple text files into one text file. Is there any command in ubuntu terminal to do this, or do I have to do it manually?
James Ele
  • 111
  • 3
  • 13
2
votes
0 answers

Error Opening Terminal xterm on Windows GitBash

So I have tried a few ways to install Nano to be able to use it through GitBash on Windows 10. I've tried the .msi way of installing it, tried downloading the zip and put it in C:/Program Files/Git etc, and it currently works in Windows cmd…
WebTim
  • 247
  • 6
  • 10
2
votes
0 answers

Nano text editor not warning when opening file already open

Context: I recently started using the nano text editor on a new machine (Red Hat based). There's no GUI. I'm doing everything through the terminal. I'm using tmux to run multiple commands at once. Steps to reproduce: Open up an existing file in…
falsePockets
  • 3,826
  • 4
  • 18
  • 37
2
votes
0 answers

Local git ssh into server using Tower

I'm new to git, i've always used FTP but someone told me that this is the best way to go and i'm keen to give it a try so i'm trying to set it up but having an issue. Rather than use github etc, i've decided to have a local git and then push that…
Dan
  • 1,565
  • 3
  • 23
  • 43
2
votes
0 answers

How to write Russian/Unicode characters in nano/vi editor

How do I get Russian letters to show up properly when using nano? Currently they show up like this: �^��^�новн�^�е
Ryan
  • 782
  • 1
  • 10
  • 25
2
votes
1 answer

How to configure nano to set tab to 4 spaces except for Makefiles?

Is there a way to tell nano use 4 spaces insead of TABs for every file except for Makefiles?
ceremcem
  • 3,900
  • 4
  • 28
  • 66
2
votes
1 answer

Why does (?:\s)\w{2}(?:\s) not match only a 2 letter sub string with spaces around it not the spaces as well?

I am trying to make a regex that matches all sub strings under or equal to 2 characters with a space on ether side. What did I do wrong? ex what I want to do is have it match %2 or q but not 123 and not the spaces. update this \b\w{2}\b if it also…
user5448026
2
votes
1 answer

How to edit a text file over a network with netcat plus some $EDITOR

(no alternate suggestions like vim --servername, or vim over ssh, or "just use ssh", or nfs, sshfs please. Also I prefer to avoid more elaborate incarnations of netcat like ncat) I'd like to edit my text files that exist on another computer over a…
Sridhar Sarnobat
  • 25,183
  • 12
  • 93
  • 106
2
votes
5 answers

How use editor with "git commit"?

I have installed fresh Ubuntu 12.04 and initialized some project with git. When I did git commit, it opened some file with nano editor for me to enter commit description. Questions: 1) Can I use vi instead of nano and how? 2) Should I append…
Dims
  • 47,675
  • 117
  • 331
  • 600