Live data from Hacker News

GNU nano is my editor of choice

ariadne.space

191–200 of 236 posts

Re: GNU nano is my editor of choice

#191
post #124
post #49

Earlier quoted context omitted.

POSIX doesn't say anything about containers.

Most Linux distros aren't 100% posix compliant as far as I know.

Looks like EulerOS is the only one certified (which isn't the same as compliant).

https://www.opengroup.org/openbrand/register/brand3622.htm

Re: GNU nano is my editor of choice

#193

Earlier quoted context omitted.

Real developers only use cat >> to edit, and start from scratch if they make a mistake.

I guess I'm imaginary then, because I use sed -i to fix mistakes.

I don't know if they're taught these days-- they weren't when I was in school-- but sed & awk are two tools I'd recommend to pretty much everyone.

I remember stumbling on to them in my first job and thinking an very much appreciating their power over having to write a small program to iterate through an arbitrary # of files to do something... and another small program if I wanted to do something slightly different, etc.

Re: GNU nano is my editor of choice

#194

Earlier quoted context omitted.

Real developers only use cat >> to edit, and start from scratch if they make a mistake.

Or a magnetized needle, or a butterfly... https://xkcd.com/378/

Wow, it seems I wasn't thinking low-level enough. I'll have to remember that emacs macro. If I ever get around to learning emacs.

Re: GNU nano is my editor of choice

#195

Earlier quoted context omitted.

Real developers only use cat >> to edit, and start from scratch if they make a mistake.

I guess I'm imaginary then, because I use sed -i to fix mistakes.

If numbers can be imaginary, why not people? Many imaginary numbers are extremely useful, so there's no reason you can't lead a perfectly productive career as an imaginary person.

Re: GNU nano is my editor of choice

#196
post #62

Earlier quoted context omitted.

Every Unix machine (Mac or Linux) that I've ever tried to use nano on has had it preinstalled. I'm sure not all of them have it preinstalled, but it's common at least in mainstream distros

In the late aughts, I found myself at the keyboard of a Solaris system that only had ed. I was there to get the network configured and it didn't have an optical drive, so there was no way but forward. More recently, I've found myself inside a container which didn't have any editors. I got the job done with echo, head and tail. Delightful.

How do you even get a container like that working?

Even alpine based images have a version of vi (it comes with busybox)

Re: GNU nano is my editor of choice

#197

It's worth pointing out that many distros ship with a positively prehistoric version of nano (i.e. v2.9), whereas the latest version is actually lightyears better. I agree with the author completely. As for the "yes but vim keystrokes" apologists, honestly I have yet to find something truly important I can do with significantly less keystrokes in vim. (especially if you factor in programmability and macros).

Do you not use motions? I use stuff like `dfXa` where X is the character I want to delete to, for example. I could do 23x, d6w, or d/foo, depending on the information I have, either way this is light-years faster than what I can do without motions. Macros and programmability are great, but they are more for boilerplate stuff than just one-off mangling text fast. You can also hit the arrow keys in sed mode to reuse old commands, a lot more painless than recording and storing a macro in my imagination.

Re: GNU nano is my editor of choice

#198

Obligatory XKCD: https://xkcd.com/378/ "nano? Real programmers use emacs." "Hey. Real programmers use vim." Personally I use TextWrangler (BBEdit) for fun, and VS Code at work. I know how to exit vi though! "Q. How do you generate a random string? A. Put a Windows user in front of vi editor and ask him to exit." https://www.reddit.com/r/ProgrammerHumor/comments/72y7lr/q_h...

Tried it, most people end up putting vim in background with Ctrl+Z instead of closing it.

Re: GNU nano is my editor of choice

#199
post #4

I've been a really big fan of Micro[1]. A single binary with excellent out of the box features. Mouse mode, syntax highlighting, tabs etc [1] https://github.com/zyedidia/micro

The only thing that keeps me from using it as my daily editor is the clipboard functionality in WSL (using Windows Terminal). The first problem was clipboard not working at all, after some updates and tweaks (aliasing xclip to a custom bash script) the clipboard worked. The second problem is yet to be resolved: copy/cut and paste ignores new lines, I haven't found a solution ... Any advice is appreciated!

that and it does seem to crash quite a bit.

Re: GNU nano is my editor of choice

#200
post #190

Earlier quoted context omitted.

Well, I'd put some limits on this. If a coworker cobbled together something that still let them program by punch card then I'd 1) probably be frustrated with their level of output and 2) impressed at the setup. 3) asking for their extra set of eyes on my own code because if they had the patience for punch cards they would probably be better than me at catching errors.

I would probably be wondering where the machine is kept that reads punch cards. And how to use it. And how do I make punch cards. Then, after all that, your list seems like it would suffice.

where the machine is kept that reads punch cards

In my mind I envisioned in on their desk in the next office over that looked like something out of the movie "Brazil" and machines on the desks during the Central Services scene [0]

[0] https://www.youtube.com/watch?v=V-yXL-LDMyg

Post reply on HN