Live data from Hacker News

GNU nano is my editor of choice (2021)

ariadne.space

291–300 of 303 posts

Re: GNU nano is my editor of choice (2021)

#291
post #263

Earlier quoted context omitted.

> Yeah, maybe. Not entirely convinced though :-) You didn't actually provide an argument against having a sane set of defaults with the option to configure them later. > As an artist, you can choose to make the kind of music most people want to hear in a night club, or make the kind of music you, as a musician, like. And accept that maybe that's not for the majority. "For art" is a non-answer when it comes to UX - be…

> You didn't actually provide an argument against having a sane set of defaults with the option to configure them later. I am not convinced that it is possible to come up with a generic sane set of defaults for all apps in a way that would solve the problem of VIM being fundamentally different. Everybody wants sane defaults, I don't see the debate there. > "For art" is a non-answer when it comes to UX Not my point at…

> I am not convinced that it is possible to come up with a generic sane set of defaults for all apps in a way that would solve the problem of VIM being fundamentally different.

That's not a problem that needs to be solved. "Generic sane set of defaults" excludes vim as an editor by definition.

In terms of which editor should be used by default, vim should not be the default[1].

In terms of keybinding defaults for vim, because vim's modal editing model is so unique, it's totally fine for a universal keybinding system to not trivially integrate with it - just like it's totally fine for libc to not contain every single variant of a memory allocation or string copy function. No abstraction is universal.

> for all apps

Again, a red herring - there's no reason why any programming system has to work "for all the things".

> My point was that "for the majority" is not necessarily the right answer when your system (Linux) is used by a minority.

This is such a vague statement as to be meaningless. How, specifically, are you claiming that Linux users are different from Windows/MacOS users that a different system is needed?

Moreover, given how obviously the design strategy of "sane consistent (but configurable) defaults" fits in to human cognition, I'm very curious as to why you think it somehow doesn't apply to Linux users. If your answer is "they're more technical" - that's irrelevant. Power users and programmers also want user interfaces for new tools to be maximally sane and consistent during their initial learning period, and the configurable afterward. This isn't a Windows/MacOS/Linux thing, this is a human thing.

> Especially because the easiest example (text editors) has huge, obvious counter-examples showing that there is no universal set of defaults to edit text on Linux (nano vs emacs vs vim).

That's because they're obviously not counter-examples. vim and emacs are not the default editor on the majority of user-facing Linux boxes (graphical Ubuntu) - they have to be picked and learned, and most non-technical users that try quit very fast. Those are not even candidates for a set of defaults - those are highly user-hostile specialized programming tools. You know what the default text editor is in Ubuntu? Gedit. Not vim or emacs, not nano or even pico. Gedit. That's the default, and its behavior very closely matches the behavior of the default text editors on Windows and macOS.

Moreover, there is a set of defaults, without a name, that corresponds roughly to what you get in a text field in Firefox. Left-click to place cursor, right-click for context menu, drag-left-click to select region, ctrl-c to copy, etc. You get this behavior in Libreoffice, Gedit, Firefox, Blender, GIMP, various file explorers, random GTK+Qt widgets, and basically everything else except vim, emacs, nano, and the terminal. That is the standard.

As further evidence: the number of people who know how to use ctrl+z/x/c/v (and other standard text-editing shortcuts) outnumbers the combined amount of people who know how to use vim and emacs, by orders of magnitude.

So, yes, there is a set of defaults on Linux. Vim, Emacs, and Nano are not it.

[1] https://news.ycombinator.com/item?id=34161694

Re: GNU nano is my editor of choice (2021)

#292
post #269

Earlier quoted context omitted.

There are only two kinds of non-modal editors. 1. A useless, primitive thing in which every single keystroke inserts a character or performs an edit action, and then returns to the initial state. Typically found in the simplest edit controls offered by a windowing UI, or very simple command line editors. 2. A command-oriented editor in which every action is performed by typing a line of input, terminated by Enter to…

Suggesting that nano and vim are both "modal editors" because nano has some confirmation dialogs is not a deep insight, it's just pedantry. And it ignores the entire reason why you'd describe an editor as modal: that changing modes is integral to the editing experience. You can't change modes in nano to make editing more efficient.

That may be the entire reason you would describe an editor as modal, but those who don't like modal editors have a different reason: they claim that they are confused by stateful behavior: that the same inputs cause different things to happen depending on what state the program is in. Usually, plenty of modal behaviors can be identified in whatever alternative they endorse. The depth of that insight is what it is.

Re: GNU nano is my editor of choice (2021)

#293

[flagged]

If you keep crossing into personal attack we are going to have to ban you. No more of this, please.

If you'd please review https://news.ycombinator.com/newsguidelines.html and stick to the rules when posting here, we'd appreciate it. Note this one:

"Please don't pick the most provocative thing in an article or post to complain about in the thread. Find something interesting to respond to instead."

Re: GNU nano is my editor of choice (2021)

#294

Earlier quoted context omitted.

I'm an enthousiastic vim user. I think everyone who spends a lot if time editing text and who doesn't use vim (or similar) is probably missing out (including the author of this article). I think vim is really good. But I 100% agree that vim is a stupid default. In almost every context it's going to confuse more people than it makes happy.

> [...] everyone [...] who doesn't use vim (or similar) is probably missing out (including the author of this article) Did you read the article? The author used both emacs and vim. Quote: "I don’t like either of them, for differing reasons: modal editing doesn’t really fit my mental model of how an editor should work, [...]" I don't get how people who like modal editing can't accept that other people don't. From my e…

I get the feeling he occasionally used it, but not intensely for a long time.

Modal editing isn't something that comes naturally. You have to train yourself to use it. I believe everyone can learn to do it as if it's natural.

I learned how to use vi/vim a long time ago, and if you put me in the same position now I probably wouldn't learn to use it. It was a lot of effort. Having done it, I'm really glad I did, but it's hard to see how nice it is before you're put in the effort.

I also like dancing, and often a teacher will make you move in a way that doesn't feel natural. Months later, once you've got the hang of it, it makes total sense that that's the better way. It becomes natural. Driving with a stick shift didn't feel natural at first, now I miss the clutch when it's not there.

Sometimes the "unnatural" way is better. I'm guessing the same is true for the way chefs cut vegetables, or classical guitarists hold their guitar.

I won't fault anyone for not using vim, I understand it's a tradeoff and not everyone wants to put in the effort. And if you don't spend a lot of time editing text, it's not worth it.

Just to possibly annoy even more people: if you spend a lot of time on a keyboard, and you can't touch-type, I also feel you're missing out. (That wasn't natural for me at first either).

Re: GNU nano is my editor of choice (2021)

#295

Earlier quoted context omitted.

Git for windows makes a huge deal in its installer about how the default is unchanged for compatibility and how you should pick nano or vsc instead

It should really at least give notepad as an option and strongly suggest that over vi unless you are looking for compat (compat with what?). Tbh I don’t know why you’d want a bash for it to begin with. The only thing I miss in other shells (cmd/PS) is that you can’t make shell aliases in git.

Compatibility with old scripts I presume. And notepad is probably on the list too.

But of course you want bash with git. PS and cmd are just painful to use

Re: GNU nano is my editor of choice (2021)

#296
post #5

There was a time (2006?) when I was getting into linux. I was a big microsofty, due to comfort mostly, and I was shamed into trying Linux. Like most people I went Ubuntu first, but wifi drivers at the time were lacking, and nvidia of yore was certainly not better than nvidia of now. Suffice it to say: I spent a lot of time in the terminal trying to fix things. Nano was my tool of choice because: honestly the initial…

nano is anything but "not powerful".

i have yet to find someone doing complex editing stuff in vim that i cant do (i.e. with the same effort or less) in nano. Unironically.

Re: GNU nano is my editor of choice (2021)

#297
I agree with the article. I think most people who think nano is a "weak" editor simply haven't really used it beyond opening a file, editing a line, and then closing it.

I do all my coding in nano, and I'm more than happy. I gave vim a sporting chance, know how to use it reasonably well, and do use it comfortably when editing collaboratively with a vim user. But nano just works, and without having to go through silly mental hoops. And for all the "mental efficiency" talk, in practice 99% of vim users I have interacted with either end up ignoring all the complicated stuff such that vim actively ends up wasting more of their time to do otherwise simple stuff, or manage to shoot themselves on the foot for every other "clever" thing they try to do.

The latest release (7 onwards) has also become even more powerful, now that it allows function calling in macros (previously you could only use pre-bound keybindings)

Re: GNU nano is my editor of choice (2021)

#298
post #263

Earlier quoted context omitted.

> You didn't actually provide an argument against having a sane set of defaults with the option to configure them later. I am not convinced that it is possible to come up with a generic sane set of defaults for all apps in a way that would solve the problem of VIM being fundamentally different. Everybody wants sane defaults, I don't see the debate there. > "For art" is a non-answer when it comes to UX Not my point at…

> I am not convinced that it is possible to come up with a generic sane set of defaults for all apps in a way that would solve the problem of VIM being fundamentally different. That's not a problem that needs to be solved. "Generic sane set of defaults" excludes vim as an editor by definition. In terms of which editor should be used by default, vim should not be the default[1]. In terms of keybinding defaults for vim…

> So, yes, there is a set of defaults on Linux. Vim, Emacs, and Nano are not it.

If you mean on Ubuntu, then sure. Ubuntu's target audience is essentially people who want an alternative to Windows/macOS. Not people who want the freedom to use their preferred tools. You think systemd is a sane default and advanced users "just have to change it if they don't like it"? Try replacing systemd on Ubuntu, let me know how it goes. You don't want snaps? Well it looks like it may get harder and harder to not use snaps, because people like you think that it is fine to enforce the most used tools as "the standard". You want to use a tiling window manager? Well many apps will just suck, because people assume that the "standard" is Ubuntu. Same for those apps that require network-manager, or the gnome keychain, etc. The "Linux way", IMO, would be to create CLI tools with minimal dependencies, and then build GUIs on top (maybe even specialized for the latest Ubuntu). But that's not what's happening. You want to use Firefox as a browser, and have a lightweight calculator app next to it? No luck, chances are that your calculator app is shipped with Chromium, because people decided that the standard is Chromium and webapps. And that's if you're lucky, because your calculator may be shipped with a full rootfs in a docker container.

So from my point of view, there are people coming from Windows/macOS to Linux for some reason (apparently not the freedom of Linux, because they don't even wanna know how their system works), and argue against my freedom, because if I don't want the Windows/macOS experience, then I am a weirdo.

> So, yes, there is a set of defaults on Linux.

You mean "the defaults of Ubuntu, which represents most Linux Desktops"? I don't want it. I want the choice to choose the distro closest to my preferences, and let Windows/macOS people choose Ubuntu. But that means that those Ubuntu people should not insist on everyone doing what Ubuntu does.

Re: GNU nano is my editor of choice (2021)

#299
post #5

There was a time (2006?) when I was getting into linux. I was a big microsofty, due to comfort mostly, and I was shamed into trying Linux. Like most people I went Ubuntu first, but wifi drivers at the time were lacking, and nvidia of yore was certainly not better than nvidia of now. Suffice it to say: I spent a lot of time in the terminal trying to fix things. Nano was my tool of choice because: honestly the initial…

nano is anything but "not powerful". i have yet to find someone doing complex editing stuff in vim that i cant do (i.e. with the same effort or less) in nano. Unironically.

In particular, unless I misunderstood the problem, removing the first n characters in nano works exactly as it would in vim. Regex replace "^...." with "".

Or replace a selection with the output from a call to 'cut'.

Re: GNU nano is my editor of choice (2021)

#300
post #266

Earlier quoted context omitted.

> You're advocating for needlessly restricting user choice Nope, I'm advocating for letting the app developers do what they want. Enforcing apps to honor the system-wide defaults (not even talking about how to actually enforce it) would just break emacs and vim, for instance. > How is this not trivially solved [...] Well first you need to find a way to integrate that toggle in your UI without people complaining too m…

> Nope, I'm advocating for letting the app developers do what they want. You're contradicting yourself. Your comments above are specifically arguing against the idea of implementing this system at all : > Right. So that's moving the control of the binding from the app to the system settings. The problem is that it makes it harder for the app to have sane defaults. That is an argument against the OS-meddles-with-the-k…

I think we're talking past each other. I'm not trying to win an argument, I'm just sharing my opinion. I reacted to that:

> Not having system wide keyboard shortcuts is one of [those big mistakes]: vim, emacs, nano etc all have a different shortcut to quit the app

In my opinion (and that's an opinion, not a formal proof), this does not work. _I do not want the same shortcut to quit nano, vim and emacs_. The author of that comment does, obviously. Which is why I said "preferably the standard should be your favourite shortcuts, right?". Not as a criticism, but in order to show that this is a preference, and my preference differs from the author's.

My preference is to have vim bindings be vim bindings, and not the system bindings. Sure, the system settings could offer a way to specifically set the bindings for vim instead of using the `.vimrc`. But it would not entirely replace `vimrc`, so it would split the config in what _I see_ as a weird way.

I generally don't see how it would work in practice. I can easily swap "ESC" and "CapsLock" in the system settings, but that's not the same level as setting the shortcut for a high-level action like "save". If you want to set the "save" shortcut globally, then everyone writing a program has to deal with it. First, I don't see how you can enforce it. And second, it makes life harder for developers. For something _I don't personally want_. Therefore as a developer, I won't follow your preference, period.

This is my opinion about the hypothetical idea of having system-wide settings that would unify vim, emacs and nano (that's the point of the sentence above, isn't it?). Maybe someone can implement this in a perfect way, and I would even use it (who doesn't like "perfect"?). But it _feels_ like I fundamentally disagree: _to me_, the fact that vim, emacs and nano all have a different way to quit the app is a feature, not a bug. Therefore it does not need fixing.

But feel free to explain to me what I am trying to say, and why it is logically wrong.

Post reply on HN