Live data from Hacker News

GNU nano is my editor of choice (2021)

ariadne.space

41–50 of 303 posts

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

#42
post #21

Earlier quoted context omitted.

> Not having system wide keyboard shortcuts is one of them: vim, emacs, nano etc all have a different shortcut to quit the app Not even Microsoft has system wide keyboard shortcuts. And copy paste on Microsoft has become a game of luck.

alt+f4, ctrl+s, ctrl+x/c/v, ctrl+z, ctrl+p all work near universally on windows. Up until Windows XP that was also true for F1, but shipping help files somehow got out of fashion. Of course there are exceptions, like conhost, but generally you don't have to think about how to save or quit something on windows

except when you have a different locale and language, and half your office suite have the original shortcuts, and the other half is translated like:

ctrl + a (abrir, open in Portuguese) instead of select all, that is moved to ctrl + t (tudo, all in Portuguese), and many others.

So, universally for English/US I guess.

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

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

> I feel like nano shipping as the default editor is a step-back. I’ve never used a distribution that includes nano, but not also some variety of vi and/or emacs. And there’s no “favorite”/“default” binding in terminal. There are defaults in the GUI, however those are almost exclusively Kate or gEdit. And new users probably use those far more frequently as their first editor. The only qualifier I can figure for nano…

> And there’s no “favorite”/“default” binding in terminal.

There is.

There is the EDITOR environment variable and the alternatives editor. They will be used when a program triggers an interaction that uses a text editor (e.g., mutt, git and more) instead of manually opening an editor yourself.

There are also distributions that only ship with a minimal set of editors, forcing you to install different ones. This might also be considered a "default" editor by lots of people.

edit: if you consider a "default binding" only one for manually opening a text file, then you are right, but I don't think that is what people talk about when referencing a "default text editor"

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

#44
post #21

Earlier quoted context omitted.

> Not having system wide keyboard shortcuts is one of them: vim, emacs, nano etc all have a different shortcut to quit the app Not even Microsoft has system wide keyboard shortcuts. And copy paste on Microsoft has become a game of luck.

alt+f4, ctrl+s, ctrl+x/c/v, ctrl+z, ctrl+p all work near universally on windows. Up until Windows XP that was also true for F1, but shipping help files somehow got out of fashion. Of course there are exceptions, like conhost, but generally you don't have to think about how to save or quit something on windows

You can kill windows using alt+f4 on your typical Linux Desktop (Gnome, KDE, etc). Same for ctrl+x/c/v.

It's different for programs running in terminals / terminal emulators for technical reasons. Terminals are not GUIs, they are simple devices with a single byte stream for input (displayed on screen) and output (sent from keyboard) that are interpreted quite literally. E.g. the byte ASCII 'A' will normally result in an 'A' being displayed whereever the terminal cursor happens to be. Typing 'A' on the keyboard will result in 'A' being sent out to the OS. Ctrl+(A-Z) will send the byte values 1 through 26. E.g. Ctrl+C will result in ASCII 3 (0b00000011), aka ETX (End of Text), which will normally be converted by the OS's terminal subsystem into a SIGINT signal that is sent to the "foreground" process running in the terminal. Or, if the terminal is in raw mode, the byte 3 will be read as-is by whoever reads the terminal keyboard. Same goes for ctrl+z (normally SIGSTOP is sent) etc.

Terminal apps can't expect a running clipboard service. There may not be a display or graphics environment running on that machine. The app might run on remote machine. Etc.

Notice how Windows Cmd isn't entirely intuitive about those basic cut&past things, either.

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

#45
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 would not help me in such a situation: but vim did it with no complaints; all I needed to know was the incantation.

Nano can do regexp search and replace. I think the problem with nano is the menu in the bottom because it makes people think that it's the only things it can do when in fact it's really powerful.

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

#47
post #39

There is a very simple, end-of-discussion type argument why shipping Vim as the default editor is a terrible idea: Because its user interface differs significantly from how every other program on the system works. You can have all kinds of fruitful or fruitless debates about whether there is some deeper sense in which Vim is a "superior" editor, but there is no sensible reason for it to be the default, ever. Conventi…

By that logic we should just make "ed" the default editor. It's more like every other line oriented CLI interface element in the system than Nano is.

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

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

> I feel like nano shipping as the default editor is a step-back. I’ve never used a distribution that includes nano, but not also some variety of vi and/or emacs. And there’s no “favorite”/“default” binding in terminal. There are defaults in the GUI, however those are almost exclusively Kate or gEdit. And new users probably use those far more frequently as their first editor. The only qualifier I can figure for nano…

[deleted]

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

#49
post #21

Earlier quoted context omitted.

> Not having system wide keyboard shortcuts is one of them: vim, emacs, nano etc all have a different shortcut to quit the app Not even Microsoft has system wide keyboard shortcuts. And copy paste on Microsoft has become a game of luck.

alt+f4, ctrl+s, ctrl+x/c/v, ctrl+z, ctrl+p all work near universally on windows. Up until Windows XP that was also true for F1, but shipping help files somehow got out of fashion. Of course there are exceptions, like conhost, but generally you don't have to think about how to save or quit something on windows

Not just those. Odds are shift+del to cut, crtl+insert to copy, shift+insert to paste still work in the browser text area you use to write comments. Even alt+backspace, the old IBM undo shortcut, still works in pretty much any box that lets you enter text in Windows. That's the power of generic UI components and backwards compatibility!
Post reply on HN