Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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

3
votes
1answer
64 views

When I try to load and edit files in nano or vi, it only creates a new blank file. Why is this?

When I try to load any files in nano or vi, it simply creates a blank [New File]. For some reason it won't load any files I'm trying to edit. I'm at a loss. Why would this be? I open up a terminal ...
0
votes
1answer
63 views

Nano text editor - How to bring back on the syntax coloring?

I am using the Nano text editor. Before, there was color on every command I typed, but now I don't know what buttons I pressed as there are no more colors. How to bring back on the syntax coloring?
0
votes
1answer
368 views

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 ...
1
vote
0answers
251 views

Can't create new file with nano, Received SIGHUP or SIGTERM

I found only this question of this subject: Received SIGHUP or SIGTERM: nano cannot edit empty file I'm configuring my web server. There wasn't any problems earlier and I would like to know exactly ...
0
votes
0answers
37 views

nano: how to search text with tab

How can I search text with nano and in OSX that contains a tab? I use ctr+w do start the search and then type the text I want. I tried "\t" but it doesn't work.
0
votes
0answers
48 views

Output in terminal after quitting program

I'm using Kubuntu with i3, and I've recently migrated from Manjaro because things. My terminal emulator is urxvt but, when I use programs such as vim, less or nano in the terminal remains the part of ...
0
votes
0answers
161 views

Bracket matching highlighting in Nano

In nano, we can enable bracket matching via these lines in ~/.nanorc: set brackets ""')>]}" set matchbrackets "(<[{)>]}" Once this put in the config, pressing Alt] while on a bracket will ...
1
vote
2answers
71 views

Nano editor: are Ctrl keybindings actually bitmasked?

I wanted to make Nano have more common shortcuts (i.e. Ctrl-F for search, Ctrl-H for replace, etc) and edited the nanorc file to add: bind ^F whereis all bind ^H replace all bind ^M mark all ... To ...
0
votes
1answer
75 views

How to override /etc/nanorc systemwide?

I want all users of nano to have tabsize 4 instead of the default 8. What is the best way to achieve this? I would prefer a file that overrides /etc/nanorc at the system level so I don't have to ...
1
vote
2answers
175 views

Prevent Nano from creating .save files?

I have a problem with the Nano editor. If it ever exits unexpectedly, it leaves behind .save files, which are just versions of the edits I was making. Is there a way to disable this behaviour?
3
votes
2answers
790 views

How to delete current word in nano text editor?

How to delete the complete word where cursor is positioned in nano text editor? Or if cursor is on white space, I assume it should delete the next word? Nano help shows these two functions but they ...
2
votes
0answers
23 views

Interpolated and literal Perl strings in Nano are incorrectly highlighted

I am trying to improve Nano's syntax highlighting for Perl, but I have run into an interesting dilemma. Perl uses single quotes for literal strings, and double quotes for interpolated strings. The ...
1
vote
2answers
70 views

nano text file formatter? [closed]

Is there a SIMPLE way to format nano file text? My code is getting pretty messy, so it MAY help to format it.
9
votes
1answer
5k views

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?
1
vote
1answer
62 views

Mistyped command: sudo nano / -name “supervisor”

Instead of using sudo find / -name "supervisor" I ran sudo nano / -name "supervisor" by mistake, which looked like it opened a blank nano file before I hit CRTL-X... $ sudo nano / -name "supervisor" ...
1
vote
1answer
2k views

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? ...just been using sed 's/\t//g' file ...
0
votes
1answer
35 views

How can you bind ^[ or M-[ shortcut to an action in nano?

I have been trying to bind the shortcut CTRL-[ to the unindent function, but it seems like that if you type in bind ^[ unindent main (CTRL-[) into nanorc, the text will be still formatted in red, not ...
1
vote
1answer
523 views

How to constantly show line number when navigating in nano?

I am looking for a keyboard shortcut to show the line numbers in nano editor when navigating up and and down within the file. I have seen in multiple posts about CTRL+C but this doesn't automatically ...
2
votes
1answer
279 views

How to exit nano from a different terminal?

I was ssh'ing into a Raspberry Pi running Raspbian, editing a file with nano, when I lost my internet connection (by leaving the WiFi zone). After reconnecting an hour later, I found that the pi had ...
3
votes
1answer
2k views

-bash: /usr/bin/nano: No such file or directory

I have this problem on fresh install of Debian 8 (after doing apt upgrade). nano is installed but when I try to use it to open a file : nano myfile.txt I get: -bash: /usr/bin/nano: No such file or ...
0
votes
1answer
89 views

Can I modify the behaviour of backspace in gnu nano?

I tried to configure my nano to more python friendly editor. I wrote the following to my .nanorc set tabsize 4 set tabstospaces I was wondering if I can change the bahavior of backspace such that ...
1
vote
1answer
54 views

cancel a search in nano?

So I'm editing this 1MB file on a slow command-line only Debian machine, and I accidentally forgot to untick a "Search Backwards" mark when searching for something. So now Debian is searching for ...
-2
votes
1answer
205 views

How can I get syntax highlighting on CronTab when using Nano as Editor?

Ubuntu, RaspBian and FreeBSD offer the user to choose editor on first crontab -e execution, so I selected Nano Editor. But syntax highlighting seems not be enabled. I tried the same parameter I use ...
0
votes
1answer
282 views

Copy a line of text from nano running in a shell over ssh in order to paste into a local gedit instance

I routinely access remote files using nano in a terminal shell over ssh. Sometimes I'd like to copy a large amount of text (sometimes one line sometimes a large block) and paste it into a local ...
0
votes
0answers
373 views

How to open a terminal file in TextEdit

I use nano <file_name> to open/edit files on terminal. However it's very hard to edit so is there a way to open terminal files in TextEdit? EDIT: open -a TextEdit <my_file_name> and open ...
27
votes
6answers
47k views

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?
2
votes
2answers
885 views

Why is /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed not modifiable by sudo emacs?

I would like to edit /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed to change its content from 800000 to 1600000. I first try with emacs $ sudo emacs -nw /sys/devices/system/cpu/cpu0/cpufreq/...
0
votes
2answers
156 views

Echo something to console each time you quit crontab

To edit the root crontab in Debian I do for example sudo crontab -e. To exit from the preferred text editor (Nano), I do CTLR+X. So far so good, but what if I want that each time I exit crontab, a ...
2
votes
1answer
72 views

How to make 'emacs' indent with tabs exactly how 'nano' does…?

How can I configure ~/.emacs so that I indent how nano does by default? Uses a tab character instead of 5 spaces I can add as many tabs to a line as I please
0
votes
1answer
143 views

How to edit files in text editor and not terminal when using nano command? [closed]

So when I use nano it opens a little interface to edit the file. However, is there a way to open the file with text editor?, as that is much easier to edit, navigate and save.
27
votes
3answers
4k views

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 ...
-1
votes
1answer
1k views

Cannot Save ~/.bash_profile file

As the attached picture shows, Ctrl+O or Ctrl+X does not save the ~/.bash_profile file. Notice the dot on the red circle for closing the window. I also tried other editors such as vim and emacs and ...
2
votes
2answers
4k views

GNU nano 2: DOS Format or Mac Format on Linux

Which format (Mac or DOS) should I use on Linux PCs/Clusters? I know the difference: DOS format uses "carriage return" (CR or \r) then "line feed" (LF or \n). Mac format uses "carriage return" (CR ...
2
votes
1answer
97 views

Use keyboard shortcut automatically in nano? [duplicate]

I'd like the line numbers to show automatically whenever I use nano. I've seen the set const command in ~/.nanorc but I want to see the line numbers in the column to the left, activated by meta-# ...
-1
votes
2answers
350 views

Re-bind alt left/right in nano

I'd like to rebind the alt-left and alt-right keybindings in nano, can't seem to get it to work. I'm on ubuntu 16.04 my ~/.nanorc file: bind M-right nextword main bind M-left prevword main version ...
1
vote
4answers
771 views

How do I make nano act like vi when it comes to text wrapping?

When using vi and long lines, the text are wrap but vi doesn't insert a CR/LF at the end of the line. With nano, if I start typing and the line becomes too long, it will insert CR/LF at the end of the ...
0
votes
1answer
746 views

nano - soft wrap at 80 characters

I would like nano to soft-wrap at 80 characters. That is, as I keep typing, the text should flow to the next line beyond 80 characters, without nano insert a \n newline at 80 characters. set softwrap ...
1
vote
1answer
823 views

How to copy and paste in nano editor with mouse enabled? [duplicate]

In normal mode, I can use mouse left button to copy and right button to paste, but not with mouse mode: -m --mouse Enable the use of the mouse Is copy/paste still possible with mouse ...
0
votes
2answers
749 views

Arch linux + I3 + URXVT: ROFI opens nano editor in bash instead of URXVT

The bash script that uses ROFI is: xdg-open "$(locate home | rofi threads 0 -dmenu -i -p "locate:")" This works fine from URXVT (command line), but when I bind this to a key and open ROFI, Every ...
0
votes
2answers
212 views

Nano through Sudoedit = No colors

Here are my personal aliases for editing root owned files: # CLI superuser nano; compiled; version 2.8.0 function sunano { export SUDO_EDITOR='/usr/local/bin/nano' sudoedit "$@" } # GUI ...
1
vote
1answer
894 views

Compiling Nano with UTF-8 support on one computer failed

I want to compile Nano from source for my friend. I have successfully compiled it on all of my computers and he's having Linux Mint 18.1 too. I don't know why; or better said I don't know what is ...
0
votes
1answer
113 views

Compiled GNU/Nano: How to add to system editors list

I have compiled GNU/Nano editor myself and I wish to add it to the system editors list. which nano Tells me the following location: /usr/local/bin/nano So it should be something like: sudo update-...
0
votes
1answer
1k views

Trouble installing nano

I have a docker container running debian linux (it's using the postgres image) that I'd like to install nano on so I can edit files. However, when I try # apt-get install nano the output I get is ...
0
votes
1answer
89 views

want to create a cron job to play video file? [duplicate]

But its showing --> no crontab for vishal - using an empty one crontab: installing new crontab any suggestions how to workout ?
-1
votes
1answer
313 views

How to schedule a cron job to run a video fill every 5 minute?

I need to play a video file on vlc every 5 minutes daily.
1
vote
0answers
205 views

OpenWrt Linino - Enable syntax highlighting in nano

I'm running Linino on my Arduino Yun and I'm trying to enable Python syntax highlighting when using nano. I've looked under /usr/share but there's no nano folder there. Ctrl+G from inside nano just ...
0
votes
3answers
2k views

How to input text into a new text file using nano from command line?

How to input text into a new text file using nano from command line? I would like the same as with the following, but using nano: echo 'Hello, world.' >foo.txt Result: nano is not capable of ...
1
vote
1answer
433 views

Do I have kernel support for fbtft?

When I trying this command modinfo fbtft I get this result: modinfo: ERROR: Module fbtft not found. But when I do checking, I have fbtft file in this location : /lib/modules/3.18.1+/kernel/drivers/...
2
votes
3answers
1k views

Compiling Nano editor with options

I am trying to compile my favorite nano command-line text editor with some of the options. Actually, most of the options in order to enable all features. First, I go to Downloads directory and ...
0
votes
1answer
1k views

Make nano hard-wrap lines at 80 characters

I saw Long line wrapping in Nano and while the manpage says - set fill number - Hard-wrap lines at column number number. If number is 0 or less, the maximum line length will be the screen ...