Live data from Hacker News

Nano 5.7

lists.gnu.org

101–110 of 157 posts

Re: Nano 5.7

#101

Don't give hate a chance, guys. Just ask people to use `editor` to edit text files, it will open the default editor on their OS (at least Debian). Our goal is to ask others to edit some text files, not to ask them to use what tool to edit those files. Cheers.

Ed is the standard text editor.

Re: Nano 5.7

#102
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…

One thing I've found nano useful for: git commit messages. If the commit file is empty, that cancels the commit. Nano will tell me how many lines it actually wrote, so if I have second thoughts I can cancel with certainty. Nano may well not be unique in that regard, but I tripped over another editor that saved what I thought was an empty file as a single line with just the EOL character.

I like to quit vim with a non-zero return value in some exceptional cases. git and most other tools will interpret this as "something bad happened" and won't do anything further

    :cq

Re: Nano 5.7

#103
post #67

I don't understand the people who dislike nano as an editor for the *nix system. After spending in it for like 30 minutes - it becomes an indispensable tool for quickly touching up text files anywhere you go to! No matter where I SSH to (*nix systems) - I always had nano available.

Emacs has had TRAMP[1] (transparently allows you to edit remote files in your local editor using an SSH client) for literally decades now, while SSHFS has been around for nearly as long, and even zeitgeist tools like Visual Studio Code have equivalent TRAMP-like/auto-SSH addons. The "it's not available on remote machines" line of reasoning hasn't been valid for at least 20 years (age of TRAMP), except for the case wh…

Also, the OS that the editor is running on probably supports mounting a remote filesystem via NFS or SMB.

Re: Nano 5.7

#104
Some past threads - hard to pick out from other nanos -

An Atonement of Nano - https://news.ycombinator.com/item?id=26063301 - Feb 2021 (100 comments)

Nano 5.0 - https://news.ycombinator.com/item?id=23995909 - July 2020 (195 comments)

Fedora Approves of Making Nano the Default Terminal Text Editor - https://news.ycombinator.com/item?id=23818199 - July 2020 (95 comments)

Fedora Devs Looking to Change Default Editor from Vi to Nano - https://news.ycombinator.com/item?id=21566828 - Nov 2019 (34 comments)

GNU Nano 4.0 - https://news.ycombinator.com/item?id=19476526 - March 2019 (147 comments)

GNU nano 3.0 released - https://news.ycombinator.com/item?id=17946145 - Sept 2018 (43 comments)

GNU nano 2.9.0 - https://news.ycombinator.com/item?id=15731079 - Nov 2017 (59 comments)

Nano to remain in GNU - https://news.ycombinator.com/item?id=12420683 - Sept 2016 (65 comments)

What’s up with nano? - https://news.ycombinator.com/item?id=11958728 - June 2016 (79 comments)

Nano is no longer a GNU project - https://news.ycombinator.com/item?id=11953044 - June 2016 (229 comments)

Re: Nano 5.7

#105
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 you enjoy vim, I would totally encourage you to play around with nano a bit more. You may be positively surprised at what you find.

Re: Nano 5.7

#106
post #99
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…

Linus Torvalds said he might switch to nano for his daily driver[0] >[Text editing is] all done in a traditional terminal, although I don't use 'vi'. I use this abomination called "micro-emacs", which has absolutely nothing to do with GNU emacs except that some of the key bindings are similar. I got used to it at the University of Helsinki when I was a wee lad, and I've not been able to wean myself from it, although…

I used joe for a while, basically because it was installed at the Uni's labs (and because I had used WordStar on DOS). vi (or vim, can't remeber) was misconfigured with terrible defaults, so basically I got used to joe.

It was very hard to force myself to stop using it and learn vi!

Re: Nano 5.7

#107
post #61
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 personally prefer nano over vi, ed or emacs. But when I do some programming or bigger work I use proper IDE like Visual Studio Code or Eclipse. It's decent enough for times when you want to do something quick on cli. And then spend rest of the time with graphical IDEs...

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

Re: Nano 5.7

#108

I don't understand the people who dislike nano as an editor for the *nix system. After spending in it for like 30 minutes - it becomes an indispensable tool for quickly touching up text files anywhere you go to! No matter where I SSH to (*nix systems) - I always had nano available.

I had a co-worker, whom I miss every time Nano comes up. He strongly preferred Nano, but not in an annoying way. He’d go through all our documentation and change ‘vi’ to ‘nano’, just because he could. He reasoned that anyone could use Nano if required, but vi could get a little weird at times.

Re: Nano 5.7

#109
post #48

I never understood the hate Nano gets from vi users. Nano does many things quicker and easier than vi. For example, search & replace. Would I code in Nano? No. Do I use Nano to edit configuration files and make other small edits? Absolutely.

I'm intrigued. How do you search and replace in nano and how can it be better than `:%s/ / /gc`? I thought search and replacement was one of the killer features of vim.

In nano the equivalent command (as keystrokes) would be: '^\' (or 'M-R') to enter 'replace' mode (M-R to toggle 'regex' mode on off) 'A' to 'replace all' (or you can replace interactively)

And if you really want to shave off the extra 2 keystrokes for the 'M-R' toggle and 'A' option, you can always create a new macro in your config file that does just that.

Re: Nano 5.7

#110
post #89
post #43

Earlier quoted context omitted.

I've installed nano on every Linux system I've ever worked on, if it wasn't already there of course. For me, it's so much easier to work with than vim, for changing config files etc. I only wish line numbers were enabled by default, or at least there was a simple and easily discoverable way to enable them.

echo "set linenumbers" > ~/.nanorc

Huh, I seem to remember it being more arcane than that, but in truth it's been a few years since I bothered trying.

Anyway, thanks - this looks easy to remember!

Post reply on HN