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
3 answers

How to open an editor from a bash function?

I have a simple function to open an editor: open_an_editor() { nano "$1" } If called like open_an_editor file.ext, it works. But if I need to get some output from the function — smth=$(open_an_editor file.ext) — I cannot see the editor, script…
Johnny Woo
  • 187
  • 1
  • 4
  • 10
2
votes
3 answers

Sort for specific lines in text

I have the given text: # Blub Hello this is a blub text. # Bla This is the bla text. # Abba Another text. Is it possible to sort for the lines with the #? So that the resulting text is: # Abba Another text. # Bla This the bla text. # Blub Hello…
cherrun
  • 2,102
  • 8
  • 34
  • 51
1
vote
2 answers

Swedish characters (åäö) in Vim & Nano

When I'm using Vim or Nano in Mac OS X Lion, the Swedish characters "ÅÄÖ" show up as "åäö". It works fine in Terminal. I've added this line to my .vimrc: set encoding=utf8 If I run locale in Terminal it…
Richard
  • 3,839
  • 5
  • 28
  • 34
1
vote
1 answer

Nano's find and replace in Vim?

Vim's find and replace is very powerful and very useful however sometimes I don't want that power - adding backslashes can be a drag. Sometimes, I just want to find and replace exactly across a whole document. No patterns. No magic. Nano's…
user542603
1
vote
0 answers

Trying to pull remote repo to local

What I am trying to do was pull from remote repository to local. I had an issue with "refusing to merge unrelated histories. I got an answer from SO. I wrote a command of git pull origin master --allow-unrelated-histories it took me from regular…
miPythOff
  • 43
  • 5
1
vote
1 answer

How to configure watchdog for the arduino Nano 33 BLE Sense board?

For the arduino Nano 33 BLE Sense board, the standard avr/wdt.h is not available. And it seems that no standard library provides it. How to use the watchdog system for this board ? I found no full information about it. I've found the page…
tjbtjbtjb
  • 11
  • 4
1
vote
1 answer

How to suppress the certificate check when trying to install anything using apt-cyg?

For Eg: $ apt-cyg install nano Installing nano nano-4.9-1.tar.xz: FAILED sha512sum: WARNING: 1 computed checksum did NOT match --2022-12-06 13:41:51-- https://cygwin.mirror.constant.com//x86_64/release/nano/nano-4.9-1.tar.xz Resolving…
onlyvsn
  • 11
  • 2
1
vote
2 answers

Encountering compiling issues with implicit declaration using the strlwr function for this code

I am writing code that accepts a command-line argument and determines whether or not the argument is in order based on the ASCII values of the argument. Here is what I have as of now: #include #include #include int…
cnidarian
  • 21
  • 1
1
vote
1 answer

My code generates a random integer output and I do not know why

I am having difficulties with the output of a program for an assignment and I cannot figure out what is causing my problem. The code is as follows: #include int find_minimum(int *a, int n) { int *last=(a + n); int minimum = *a; …
cnidarian
  • 21
  • 1
1
vote
0 answers

'CTRL + X' not working on mac to save and exit nano

I am running the command below on my mac to add directories to PATH, sudo nano /etc/paths In the opened nano text window, after adding all the paths, CTRL+X doesn't work to save and exit nano. tried CTRL+SHIFT+X which also doesn't work.
Nima
  • 45
  • 1
  • 6
1
vote
4 answers

Exit nano in terminal. cmd+X is not working

My OS is macOS Catalina. I open nano version 2.0.6 in the terminal to edit a file. nano first-loop.sh To exit nano, I have tried Cmd+X and Cmd+SHIFT+X, but none of these two options performs any action. It is only when I type SHIFT+Esc+X that it…
JaraTech
  • 11
  • 1
  • 3
1
vote
2 answers

How do I copy/cut text which I selected using shift+Arrow keys in Nano?

When I am trying to copy/cut in Nano command while using Shift and Arrow key to select the lines, its not working. But if I am selecting the lines with my mouse to copy/cut, its working. Is it normal or I have to change any setting.
1
vote
1 answer

Arduino Nano - Error stating '___' was not declared in the scope

I'm trying to program my Arduino so my Circuit can work properly. I have a problem with my program and its giving me error when i'm trying to compile it. Can anybody please identify what im doing wrong. I have tried but cannot find out the…
Jay
  • 11
  • 2
1
vote
1 answer

Git not opening in the defaullt text editor as configured in the /.gitconfig file

When i type the git command to open the default text editor ,git should open VScode but it actually opens nano. git config --global -e GNU nano 5.7 /home/xyz/.gitconfig > # This is Git's per-user configuration file. [user] > …
lollol
  • 13
  • 2
1
vote
1 answer

nano editor is unable to write and read a file

I was working samba on raspberry pi using putty to connect. I configured the smb.conf file using nano as my text editor. Try to use vi editor but it doesn't allow me to put in space or create a new line. After I restart samba. It creates…
Cathy fung
  • 27
  • 5