News for hackers. Stuff that matters.
Re:Nano is no longer a GNU project by bechampion on Wednesday June 22, 2016 @08:14AM (#11953229)
don't want to sound nasty , but is anyone there using nano really ? i know it come by default in some distros but that's about it really.
Re:Nano is no longer a GNU project by mikeash on Wednesday June 22, 2016 @10:04AM (#11953983)
Nano is extremely valuable for people learning the system. Typical alternatives are vi and emacs, which are extremely opaque, to the point that it's not even obvious how to exit them. UNIX tutorials will often say "use control-C to kill a command" and then that doesn't even work for this!

Nano tells you how to use it right on the screen. Control-C still doesn't work, but it tells you how to exit. Saving files, paging, cut and paste commands are all shown. There's easily accessible help!

If you're learning UNIX then editing files is handy. Without nano, you'd have to spend a bunch of time learning how to use a text editor before you could do anything that needs text editing.

Re:Nano is no longer a GNU project by Nursie on Wednesday June 22, 2016 @08:31AM (#11953339)
Yup, love it.

Not as arcane as vim, great for small edits without the oh-crap-what-have-I-pressed-force-quit-start-over phenomenon that I get in vi. 'Serious' editing is done in gedit...

Re:Nano is no longer a GNU project by theandrewbailey on Wednesday June 22, 2016 @10:09AM (#11954029)
vi makes me angry. This was obvious when I installed Debian on a 1999-era iMac and had to edit (probably) x11 conf and had to use vi with JKL; instead of the arrow keys. It made me want to stab something.

nano makes me happy.

Re:Nano is no longer a GNU project by jff on Wednesday June 22, 2016 @11:13AM (#11954547)
> had to use vi with JKL; instead of the arrow keys. It made me want to stab something.

I can see how this would be frustrating, given that the vi movement keys are in fact HJKL

Re:Nano is no longer a GNU project by theandrewbailey on Wednesday June 22, 2016 @02:07PM (#11955791)
That's probably what they were. I was trying to remember exactly, since that was over 6 years ago, and I've never had to use vi like that before or since.
Re:Nano is no longer a GNU project by xrstf on Wednesday June 22, 2016 @08:17AM (#11953252)
I use it constantly, because I'm quicker making small edits with it than with vim. I would sorely miss it if it's not installed on a server.
Re:Nano is no longer a GNU project by baldfat on Wednesday June 22, 2016 @08:21AM (#11953278)
I hear this faster for small things but if you use vim I would say I can make changes in a small document twice as fast.

They should have a new tag line:

Nano the plain text editor for non-Vim maybe EMACS users?

Re:Nano is no longer a GNU project by Already__Taken on Wednesday June 22, 2016 @08:24AM (#11953293)
This is only true if you use vim at least once a week forever. Some people don't want to study a manual to change 1 config line. Call me crazy I know.
Re:Nano is no longer a GNU project by draw_down on Wednesday June 22, 2016 @08:31AM (#11953338)
Yeah, maybe I'm just weird, but I like it when the down-arrow key makes the cursor go down a line.
Re:Nano is no longer a GNU project by philh on Wednesday June 22, 2016 @08:49AM (#11953432)
Not saying they don't exist, but I don't think I've ever encountered a vim instance where that didn't happen.
Re:Nano is no longer a GNU project by Jtsummers on Wednesday June 22, 2016 @10:18AM (#11954118)
I recall many frustrating days in college when I first learned vim but not enough to configure it (or was to lazy to). The arrow keys inserted control characters in edit mode on the basic Linux install I had at the time and on the school's computers (circa 2000-2004). It was annoying. It turned me off to vim for a while, but emacs and I were a better fit anyways.
Re:Nano is no longer a GNU project by sleepybrett on Wednesday June 22, 2016 @10:01AM (#11953945)
Yeah, maybe I'm just weird, but modal editing is kind of a pain unless you do it every day. It's just a little too arcane for making a quick edit to a file in /etc. It's probably even more natural for me having grown up in the shadow of the University of Washington, so PINE was the popular email client and PICO was it's editor.

Don't get me wrong, I've watched Vim power users do amazing things in that editor but those people are not me and I can't find a good reason to climb that particular mountain.

Re:Nano is no longer a GNU project by baldfat on Wednesday June 22, 2016 @10:23AM (#11954153)
arrows work in vim as default since 2000???
Re:Nano is no longer a GNU project by baldfat on Wednesday June 22, 2016 @10:21AM (#11954138)
vim file_foo

press i for interactive and make changes then press :wq

:) I have that embedded in my brain after all these years.

Re:Nano is no longer a GNU project by gargravarr on Wednesday June 22, 2016 @10:32AM (#11954235)
You forgot ESC after making changes ;)

nano file_foo

make changes

ctrl-O-Enter - save ctrl-X-Enter - exit

Simpler, I think?

Re:Nano is no longer a GNU project by eximius on Wednesday June 22, 2016 @11:00AM (#11954447)
Don't even need the ^O, it asks if you want to save on exit if there are modifications.
Re:Nano is no longer a GNU project by BillinghamJ on Wednesday June 22, 2016 @09:51AM (#11953868)
Many many people who need to occasionally edit text in a terminal don't know how to use Vim OR Emacs.
Re:Nano is no longer a GNU project by smhenderson on Wednesday June 22, 2016 @08:28AM (#11953317)
It's nice to have on boot disks, small enough to fit alongside busybox which ships with a lite vi[1] that some don't care for.

I personally love vi and am a bit taken aback sometimes when visudo pulls up nano instead of vi because I haven't installed it or made it my default editor yet.

So I'm not sure this means much to me personally but I'm always sad to see members of the community part ways. Still, I wish them all the luck and thank them for their efforts.

[1] https://en.wikibooks.org/wiki/Learning_the_vi_Editor/BusyBox...

Re:Nano is no longer a GNU project by skissane on Wednesday June 22, 2016 @08:23AM (#11953288)
Back in the 1990s thru early 2000s, I used to use pico before I became comfortable with vi. For someone coming from a DOS/Windows/OS/2 background originally, it was less of a learning curve. I never used nano much, but I imagine the same reasons might apply for some people today.

(I also used to use emacs a lot, I first used it on OS/2 under EMX, but there were systems on which pico was installed but emacs wasn't. Nowadays, I'm so used to vim, I start emacs and can't remember most of the keystrokes. Oh, and the first ever email client I used was Pine.)

Re:Nano is no longer a GNU project by ultramancool on Wednesday June 22, 2016 @08:17AM (#11953253)
I use it to hack config files on many distros because I find vi atrocious and don't want to install emacs on systems that aren't mine.
Re:Nano is no longer a GNU project by merlish on Wednesday June 22, 2016 @08:34AM (#11953356)
It fills a real need as the console-based text editor for people who don't know vi (and would usually use e.g. gedit rather than emacs).

(I'm sure it has other purposes too, but it's the most motivating one I know.)

Ubuntu X11 stopped working? Or perhaps you need to tweak the nginx config on that tiny VPS you're renting? If you don't know vim, nano is something that's very easy to use and often pre-installed.

Re:Nano is no longer a GNU project by gargravarr on Wednesday June 22, 2016 @10:28AM (#11954197)
7 years after getting into Linux, I still prefer Nano to make fast edits to text files. Coming from a Windows history shortcut keys are fairly natural to me, and although I disagree with some of the mnemonics, I've got the improtant ones memorised. There's enough features to even do light coding in it (syntax highlighting, auto-indenting etc.). Basically, I can pull up, edit and save a file before vim has even entered Insert mode.

Don't get me wrong, I understand the need for a feature-complex editor like vim, but I have never, ever gotten on with it.

Re:Nano is no longer a GNU project by erez on Wednesday June 22, 2016 @08:33AM (#11953349)
I use it, as a terminal editor, whenever I can. On my machines I use it instead of vi(m), and if I have control over a remote machine, there as well, I only use VI if a server doesn't have nano and I can't install it.
Re:Nano is no longer a GNU project by supbpeerr on Wednesday June 22, 2016 @08:22AM (#11953282)
I am using it constantly. first thing on a rhel server: yum install nano
Re:Nano is no longer a GNU project by therealmarv on Wednesday June 22, 2016 @09:34AM (#11953742)
yep. Beeing a DevOps since many years and still use nano for quick edits on ssh because I don't use vi(m) anywhere. Why should I learn a new editor which behaves totally different when I can use nano which behaves quite similar to my existing tools. And as you say it's on nearly every distro. On emergency I still know how to use vi... but that does not mean I like it very much.
Re:Nano is no longer a GNU project by maze-le on Wednesday June 22, 2016 @08:19AM (#11953266)
> but is anyone there using nano really?

Yes, because vim is a pain in the ... and emacs is too big sometimes.

Re:Nano is no longer a GNU project by pdkl95 on Wednesday June 22, 2016 @08:55AM (#11953469)
> emacs is too big sometimes

"Zile Is Lossy Emacs"

Re:Nano is no longer a GNU project by rekado on Monday July 04, 2016 @09:02AM (#12030462)
When I'm not in an Emacs session (which is rare) I use zile for quick edits instead of nano.
Re:Nano is no longer a GNU project by drinchev on Wednesday June 22, 2016 @08:38AM (#11953371)
There was a nice xkcd about this [1]. I know HN is not the place for this comix, but anyway your question is a bit opinionated.

1 : http://xkcd.com/378/

Re:Nano is no longer a GNU project by sampo on Thursday June 23, 2016 @06:40AM (#11959991)
> There was a nice xkcd about this

Also Hackles

https://web.archive.org/web/20160307122907/http://hackles.or...

Re:Nano is no longer a GNU project by jbb555 on Wednesday June 22, 2016 @09:15AM (#11953605)
I use it once per install. Something runs an editor and it's nano and I think oops, and exit and install gvim.
Re:Nano is no longer a GNU project by draw_down on Wednesday June 22, 2016 @08:29AM (#11953323)
Yes, it's much easier to work with than modal editors which I find clumsy and terrible. I don't use it intensively, just when I need to edit something quickly, usually in an SSH session.
Re:Nano is no longer a GNU project by kingofspain on Wednesday June 22, 2016 @09:25AM (#11953668)
Constantly - for editing crontab, or occasionally to tweak some config stuff on dev boxes. I also do a lot of PHP though so that could explain it...
Re:Nano is no longer a GNU project by pmontra on Wednesday June 22, 2016 @09:11AM (#11953577)
On some distros nano is the default editor for crontab. I run into it when I ssh to servers and have to setup cronjobs. I set EDITOR=vim if it's already installed there or I keep using nano and look at the help at the bottom of the page every single time I use it. I use emacs for editing code on my computer. It has got a different set of ctrl-* and I can't remember nano's ones.
Re:Nano is no longer a GNU project by chrisan on Wednesday June 22, 2016 @08:45AM (#11953415)
I use nano whenever I have to mess on a server directly (which is rare). Rest of the time I'm in a JetBrains product I happily pay for.
Re:Nano is no longer a GNU project by tretiy3 on Wednesday June 22, 2016 @08:40AM (#11953382)
I find it very convenient to open large log files bc Nano is very lightweight. Something like that:

$ cat /var/log/logfile | grep -n section_start which gives me required line numbers. and then:

$ nano +lineno /var/log/logfile

and for configs, of course.

Re:Nano is no longer a GNU project by Programmatic on Wednesday June 22, 2016 @10:36AM (#11954265)
I would go straight to vim and type: "/section_start<cr>", which navigates straight to that line. Then navigate to the line, "i" to enter insert mode, make edits, and "<esc>:wq<cr>".

It is absolutely a learning curve, but the power of vim is insane. "dd" deletes lines, "A" appends to the end, "I" inserts at the beginning, "<lineno>G" jumps to a line number, all little tweaks that I use nearly every day in editing files quickly. It's especially nice when editing known_hosts where it tells you the line of the offending key, just "<line#>Gdd:wq" and it's done.

Re:Nano is no longer a GNU project by ryanlol on Wednesday June 22, 2016 @11:07AM (#11954506)
>I find it very convenient to open large log files bc Nano is very lightweight.

Nano seems to be far slower than vim for opening large files.

Just quickly testing on a 200M 500k row text file on a SSD:

Vim opens practically instantly.

nano takes over 10 seconds to display text, but works well after that.

Re:Nano is no longer a GNU project by deevious on Wednesday June 22, 2016 @08:18AM (#11953257)
I seldom used it a long time ago, before learning the basics of vi(m). It's great when you need to change some random config and you need a commandline editor that has the basic commands listed in plain sight all the time.
Re:Nano is no longer a GNU project by alayne on Wednesday June 22, 2016 @09:49AM (#11953849)
I use it on some dev servers I can't install software on as an alternative to vi. Otherwise I use emacs+tramp to edit files remotely. It's not a huge use case or most of my editing. Anything to avoid vi though.
Re:Nano is no longer a GNU project by nacnud on Wednesday June 22, 2016 @08:21AM (#11953275)
A fair few raspberry-pi tutorials seem to prefer Nano, for users new to Linux.
Re:Nano is no longer a GNU project by Already__Taken on Wednesday June 22, 2016 @08:22AM (#11953283)
I only use it because sometimes vim doesn't work correctly over putty and I can't not verbally swear every time I have to search a vim issue.
Re:Nano is no longer a GNU project by teh_klev on Wednesday June 22, 2016 @09:07AM (#11953553)
Seriously, if you're spending more than a few minutes a week SSH'ing then forget PuTTY, grab yourself a copy of MobaXterm:

http://mobaxterm.mobatek.net/

It's also Pageant aware and will use that as your ssh key agent if you prefer. And vim works properly. We like it so much we pay for the Pro editions.

Re:Nano is no longer a GNU project by sena on Wednesday June 22, 2016 @09:59AM (#11953928)
"Max. 12 sessions Max. 2 SSH tunnels Max. 4 macros Max. 360 seconds for Tftp, Nfs and Cron"

Not open source and heavily limited. Unless you pay for Pro, it's pretty useless...

Re:Nano is no longer a GNU project by teh_klev on Wednesday June 22, 2016 @10:18AM (#11954121)
If you just have a handful of servers you can still get a lot done with the free edition, not useless at all by any stretch of the imagination. Paying a few quid a year to keep up with the updates is peanuts compared to the extra productivity we get from it.
Re:Nano is no longer a GNU project by laumars on Wednesday June 22, 2016 @09:50AM (#11953856)
Sounds like VT emulation settings in PuTTY might be wrong. There's nothing in vim that PuTTY doesn't support - in fact I've used vim over PuTTY many times.
Re:Nano is no longer a GNU project by the_mitsuhiko on Wednesday June 22, 2016 @08:55AM (#11953473)
Every once in a while I'm forced to use it because it's set as default on some servers until I close it in anger and get vim installed :P
Re:Nano is no longer a GNU project by Ianvdl on Wednesday June 22, 2016 @09:44AM (#11953818)
How about vi for a quick edit? I haven't come across a distro without it so far (iirc it's part of the posix spec).
Re:Nano is no longer a GNU project by sergiotapia on Wednesday June 22, 2016 @08:38AM (#11953374)
When I used to work with PHP files directly on an ssh'd serve nano was my jam.
Re:Nano is no longer a GNU project by alistproducer2 on Wednesday June 22, 2016 @09:14AM (#11953589)
nano allows for less key strokes for simple edits to config files.
Re:Nano is no longer a GNU project by yCloser on Wednesday June 22, 2016 @08:29AM (#11953326)
on any server without a monitor, ofc i use nano!
Re:Nano is no longer a GNU project by ArneBab on Wednesday June 22, 2016 @11:07AM (#11954507)
yes: It’s my goto tool for quick edits, especially when working over SSH. For larger work I use Emacs.
Re:Nano is no longer a GNU project by ArneBab on Wednesday June 22, 2016 @11:09AM (#11954521)
also if I wanted to tell others to edit something, I‘d point them to nano.