Hacker News new | ask | show | jobs
by simion314 1878 days ago
Probably the elitist guys, the ones that have their identity defined by the editor they use, the language and framework and the Linux distro/DE/OS they use.

Many people just need a tool that does a simple job but does it well, like editing a ini file and adding a line or a word, nano is great for that. (we all know that type of guy that has to tell everyone all the time that he uses Arch and Rust would have fixed everything)

1 comments

> like editing a ini file and adding a line or a word,

That's precisely the use case that has made me remove nano from every machine I administer since the 90s.

Unless you're really careful to always start nano as "nano -w", its hard word wrapping will introduce line breaks where many configuration file formats (including ini files) don't expect, and it will do so in lines other than the one you're modifying. It's less risky to simply set another editor as the default. (But if you're careful to always use "nano -w", it's a perfectly fine editor.)

I've never seen nano on any popular Linux distro hard-wrap long lines by default. Yes, it's controlled by a setting, and some people turn it on for some reason, but I just confirmed it's off by default (no need for any command-line flag) in both CentOS and Ubuntu. You might have been burned by a setting left behind by someone with a weird taste.
I learned to always, always use -w back around y2k, when my buddy taught me Gentoo. IIRC he had gotten his firewall config messed up at some point, or similar, due to forgetting that.

These days I'm still too scared of accidentally messing something up due to not passing -w, so I just do it. It's in my muscle memory after all so doesn't take much effort.

you could've also just set-up an /etc/nanorc file with the appropriate flag set.

Also I've literally never encountered this behaviour even when copy-pasting code between two machines in my humble 10 years of using nano.