Live data from Hacker News

Nano 5.7

lists.gnu.org

131–140 of 157 posts

Re: Nano 5.7

#132
post #119

Earlier quoted context omitted.

> I never understood the hate Nano gets from vi users. The reason I hate nano was that it's been forced upon me for in my view entirely misguided attempt to make the commandline more approachable. So that now instead of any competent unix person needing to have at least minimal skills with two arcane (but powerful) editors (vi - for editing, and emacs for shell keybindings at least), you now also need minimal skills…

Who is forcing nano on you? Why do they get to tell you what text editor to use? Blink twice if someone is holding you hostage at your computer, no one deserves a life of nano use.

If you have an IT career and ever advance far enough in it, chances are pretty good that you will eventually need to log into various types of servers, vms, container images that you either have no administrative control over or where this administrative control is not best used to switch around standard editor choices to suit your personal convenience.

Re: Nano 5.7

#133
post #92

Earlier quoted context omitted.

I got a local login on a machine so busted that I couldn't mount /usr, meaning I couldn't read /usr/share/terminfo, meaning no screen editors would work. I knew just enough ed that I was able to fix /etc/fstab and bring the system up. I wouldn't wanna use it every day, but it has its time and place.

"busybox vi" is another option in these situations when that's available. It will happily run in a blank chroot. Everybody should know a little ed though, it's not that hard.

It was on a server that didn't have busybox installed. Also, can busybox vi work without access to termcap or terminfo?

Re: Nano 5.7

#134

Earlier quoted context omitted.

I got a local login on a machine so busted that I couldn't mount /usr, meaning I couldn't read /usr/share/terminfo, meaning no screen editors would work. I knew just enough ed that I was able to fix /etc/fstab and bring the system up. I wouldn't wanna use it every day, but it has its time and place.

Honestly at that point, unless your fstab is really big, I'd just `cat /etc/fstab` and then `cat >/etc/fstab <<EOF` and very carefully retype it (I mean take a backup first of course).

sed is also a friend in these situations.

Re: Nano 5.7

#135
I've always thought of nano as simplistic, but reading the discussion here, I see there is more to it than I thought.

I learned vi (precursor of vim) in the 1980s and the commands became second nature to me. However, as window-based systems and applications became the norm, I found it difficult to switch between vim and Windows or Mac applications, including the web. A good example of my problem involves the use of the escape key in vim to switch out of text entry mode, but many other apps use escape to cancel an action. I got tired of typing a paragraph, hitting escape, and then having to retype the paragraph because I had cancelled my input.

Nevertheless, it's great to have an editor I can easily invoke from the Linux command-line, so I still use vim for that. However, I will consider moving to nano for that purpose. At my age, I may never know it as well as the vi/vim I learned in my younger days, but it should still be useful.

Re: Nano 5.7

#136

Earlier quoted context omitted.

Nano has/had some surprising defaults. Way back when, I was using nano to edit some file or another in /etc. When I wrote it out, it "helpfully" justified all the lines by inserting newlines to make them fit in 80 columns. My mentor looked at me disapprovingly, uninstalled nano, pointed me at `man vim`, and said "you're using this now. Thank me later." Thank you, mentor. I don't know if nano still has that as a defau…

Switching to vim because you don't want to press ^L (or set the respective configuration option in .nanorc) to toggle off hardwrapping is a bit overkill though ... It's not like "out of the box" vim is different in this regard. Half the time spent by a typical vim user with vim is coming up with personalised configurations. Surely if I said I'm ditching vim for nano because I wanted columns hardwrapped at 80 characte…

It was more along the lines of "look, you've outgrown this tool, and it's time for you to move onto something more appropriate to the work you're doing". I'm not going to criticize anyone for using nano to edit the random file here or there (so long as using it doesn't break the file). But honestly, you reach the limits of nano's abilities fairly quickly. As fine as it is for a quick change to a file, Vim and Emacs other programming editors are popular for a reason. I surely wouldn't want to use it to work on large projects with lots of files.

Re: Nano 5.7

#138
post #31

As a vim and emacs user, I don't give nano any hate. I'm surprised when programmers use it, sure, but that's because if my profession was going to require editing text files for hours a day (which it does), I would be happy to trade a steeper learning curve now for a less unpleasant job experience later. I totally understand why non-programmers don't use it. If your job does not involve you editing text files for hou…

I think your opinion simply reflects a degree of ignorance of nano's actual capabilities, rather than a genuine surprise at human behaviour. If anything, your comparison to gedit/notepad (notepad??? seriously???) makes that much clear. Honestly I don't mind vim, but I prefer nano. And I spend 24/7 coding in my terminal. Nano covers all my needs and then some. And while you should absolutely not switch vim to nano if…

Just to be clear: are you coding in nano all the time in that 24/7 terminal session? But there is no syntax highlightning etc? To edit config files, sure. But most of the time spent?

I prefer nano too; trying to learn vim. But my coding happens in either Qt Creator or VS Code.

Re: Nano 5.7

#139
post #31

As a vim and emacs user, I don't give nano any hate. I'm surprised when programmers use it, sure, but that's because if my profession was going to require editing text files for hours a day (which it does), I would be happy to trade a steeper learning curve now for a less unpleasant job experience later. I totally understand why non-programmers don't use it. If your job does not involve you editing text files for hou…

How does this have anything to do with Nano 5.7?

Re: Nano 5.7

#140

Earlier quoted context omitted.

I wouldn't call vs code an IDE, it's closer to a text editor

VSCode has intellisense, debugger, console, etc. It definitely fills a niche between a text editor and an IDE, IMO.

So does vim though. I use on vim the same language servers as VSCode.
Post reply on HN