Live data from Hacker News

GNU nano is my editor of choice

ariadne.space

111–120 of 236 posts

Re: GNU nano is my editor of choice

#111

> The vim vs emacs flame war I doubt that there is any ongoing vim vs. emacs flamewar. Most people are probably arguing about VSCode vs. JetBrains these days. My impression as an Emacs user is that if someone says they use Vim, I think "hey, one of us". (nano I guess falls into that category, but I bet nano users are missing out on some timesaving innovations from the last few years, and nothing frustrates me more th…

https://i.imgur.com/LV6umMH.png

Re: GNU nano is my editor of choice

#112
post #25
post #6

The thesis of this post is roughly that nano, when configured, is enough of an editor for the author. Which is totally fine! People should be happy with their tools and not feel pressured by popularity to use what others use (vim, emacs being prime competitors in this case). Alas, nano (and pico before it) have a certain stigma among more "experienced" Unix users that more or less boils down to gatekeeping and snobbe…

It’s not really gatekeeping or snobbery to say that knowing vim is more useful simply because I can log into any Linux machine on the planet and edit a text file without having to install an editor.

Its not snobbery if it is better

Re: GNU nano is my editor of choice

#113

So I have a question and I'd like to understand if possible. To me programming isn't text editing. Granted, we use text to write most code outside of say Pike but effectively most programming is working with symbols right? Like .subst is meaningless as an operation on a string but .substring(0, 1) is meaningful. So I don't really get the advantage of such, to my mind, rudimentary text editors. At a minimum surely bei…

To me, programming is a mental task that requires overview and easy text manipulation. Most IDEs get in the way of me effectively navigating the code as it was originally organized, while still maintaing my overview. "Big" IDEs that clearly sacrifice text area for widgets, or shift text around to pop up distracting inline "help" are the worst offenders. I'm looking at you, Visual Studio. Common IDE tools like ho-to-d…

I get the sentiment that having features like "go to definition/implementation" can encourage poor code structure, but that is still ultimately a self-discipline issue more than a UI issue. There are tools for enforcing good code structure that work with many of these fancy IDEs (Visual Studio included).

Just hitting F12 over an identifier to go to it's declaration will always be faster than manually navigating to it, no matter how fast you are with Vim, and I find these features particularly indispensable when learning someone else's codebase.

Re: GNU nano is my editor of choice

#114
post #99

Earlier quoted context omitted.

> What I thought were people looking down on me were in fact people looking at me with hopeless pity Or maybe they actually were looking down on you. When we feel bad in response to someone else, we're not usually misinterpreting the emotional cues. It's not just what they say -- it's the way they say it. Which is why the term "constructive criticism" exists. If you want to help them, then make them feel good by expa…

Have you tried... Vs What you should do is...

vs "lol use a real editor n00b"

Re: GNU nano is my editor of choice

#115
Certainly people should use the tools they like and are comfortable with. That said, I would suggest that there's a limit to this "whatever you like is fine" logic.

If you were building a birdhouse and decided you liked hammering in nails with the broad side of a wrench, yeah, ok, I guess that's your business and ultimately you can hammer those nails how you want. But if you saw a professional carpenter hammering in nails with a wrench, you'd have to seriously question whether you hired the right carpenter.

Re: GNU nano is my editor of choice

#116
post #52

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

If you’ve never logged into a Linux machine without nano installed, then you probably haven’t logged into that many flavours of Linux machine. I agree this is pretty much a non issue for the average developer, but those of us who work on network infrastructure, as red-team hackers, or do any work on embedded systems can attest to how much of a pain it would be to not know how to use vi/vim.

This is even more common in the world of containers where “nice to have just for debugging” get omitted.

You haven’t lived till you have to edit using only sed.

Re: GNU nano is my editor of choice

#117

> The vim vs emacs flame war I doubt that there is any ongoing vim vs. emacs flamewar. Most people are probably arguing about VSCode vs. JetBrains these days. My impression as an Emacs user is that if someone says they use Vim, I think "hey, one of us". (nano I guess falls into that category, but I bet nano users are missing out on some timesaving innovations from the last few years, and nothing frustrates me more th…

I wish vim had the option for CTRL-K/U behavior rather than having to do the unintuitive (to me) visual block.

I think you're referring to multiple cursors? Visual-Multi [0] is an amazing Vim plugin for this with advanced features like searching by regex, alignment by regex, transposition, duplication, auto-numbering, and more.

You can ignore the advanced features at first, it's very intuitive: just `C-n` to find the next occurrence of the word or `\\a` to find all, and then whatever editing operation you want like `cfoobar`. Or to just get another cursor on the line below, `C-`.

[0]: https://github.com/mg979/vim-visual-multi

Re: GNU nano is my editor of choice

#118
I'm all for choice but... The author is, of course, free to do whatever they like, and I'm free to say that using nano is almost certainly not an optimal workflow.

The beautiful irony of this post - some of the most common commands in nano (C-a, C-e, C-f, C-b, C-n, C-p, M-g, C-k, and more!) are taken from Emacs. If the author uses nano and bash (readline) to do work they are 80% of the way to using Emacs, the editor they supposedly don't like. And all the other commands are easily rebound to work like nano. The author could be working in an environment that's nearly identical to their current one, but that also has support for:

* A toolbar, scrollbars, pulldown menus, etc. * Displaying multiple files side-by-side * LSP * Automatic refactoring/type-checking/code formatting/etc. * Advanced movement (jump to definition) * Mouse-over to see documentation * Macros/multiple cursors/batch renaming * Automatically detect missing dependencies/namespace errors/etc. * Calling external programs & handling their output * and more...

If you write code like this I can only assume you either work like I did in high school when I used nano (alone, on small projects, with only specific languages, spending 95% of my time debugging) or that you work at 1/10th the speed of a typical programmer.

Re: GNU nano is my editor of choice

#119
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...

Post reply on HN