Live data from Hacker News

GNU nano is my editor of choice

ariadne.space

81–90 of 236 posts

Re: GNU nano is my editor of choice

#81
> it provides all of the features from vim I would want anyway, but in a modeless format

> vim-like functionality with modeless editing

> nano is a quite capable editor in its own right

but the only features that are mentioned are syntax highlighting and hiding the help text.

Looking at the man pages for nano, it _is_ a lot more capable than I had previously though (though not as capable as vim or emacs), but the author doesn't really go into that.

Re: GNU nano is my editor of choice

#82
Nano (or pico) is great for very small, quick edits. I often use it when setting up a VPS for the first time before configuring my editor’s remote SSH exten B sion (or in the past, installing rmate). I wouldn’t personally use it for more than just a quick change, but to each their own!

Re: GNU nano is my editor of choice

#83
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).

Re: GNU nano is my editor of choice

#84
post #13

Earlier quoted context omitted.

* arrow keys * pg up/down * find (^W) * go to line (^_) the first two are standard across applications, and the last two are in the help menu that shows up by default.

> (^_) Confusingly, this is actually not a ctrl (^) shortcut at all. It is alt-g.

Not confusing.

^_ is ctrl and underscore

underscore is shift and minus

So ^_ is ctrl and shift and minus.

On my computer, doing ctrl+shift+- brings up 'Enter line number, ...'.

Re: GNU nano is my editor of choice

#85
post #25

Earlier quoted context omitted.

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.

Except when it's vi and casual vim users can't figure out why nothing works

Aren't casual vim users really vi users? I use emacs primarily but years ago created an extremely minimal (~20 lines) .vimrc to be installed by default on every server I work on. Some color, maybe indentation, I don't even know because I usually just use Emacs/TRAMP these days, but I'm nearly 100% sure that every config there works in vi. I would consider myself a casual vim/vi user in that I don't know the differences.

Re: GNU nano is my editor of choice

#86

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…

The advantage is you don't become dependent on an IDE. Ever seen someone who can't write anything without all the IDE aids to fill in code for them?

Haha you're pretty much describing me. I think autocomplete overlaps with spellcheck in a text editor. You won't improve your spelling by relying heavily on a spell checker but it won't really affect your vocabulary either and enables everyone to write syntactically correct text.

Programming is more about telling the story or writing the speech than the spelling of the text. Treating code as manipulating plain text just freaks my brain out as the wrong abstraction level. But as I try and remind myself 'different people like different things and that's ok'.

Re: GNU nano is my editor of choice

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

Removing vi from your container image is rude, IMO.

Re: GNU nano is my editor of choice

#88
post #58
post #50

Earlier quoted context omitted.

But your containers may be a bit weird if their environment isn’t POSIX. Like if you removed the “cd” command or the ability to read environment variables. “Containers” is any definition you want, but surely they’re built to some standard. PS: I do make “from scratch” images a lot, I know you don’t “need” to have any utilities at all, but I’m fairly certain that a lot of software expects the “OS” to be POSIX.

I don't know what you mean. Linux containers don't contain operating systems. They contain processes. POSIX describes operating systems. Every Linux process can read environment variables. They are contained in its address space. "cd" is a shell built-in. When there is no shell, there is no "cd". Not providing access to a shell sounds like great security practice tbh. Your applications shouldn't be using it anyway (t…

This is just being obtuse for the sake of it. Yes, technically nothing in the notion of a container necessitates that; containers are just a form of namespacing. Have a gold star for understanding that. But the fact is: the vast majority of containers in use are going to be based on some minimal OS image, which is what the commenter was referring to.

Re: GNU nano is my editor of choice

#89
post #13

Earlier quoted context omitted.

* arrow keys * pg up/down * find (^W) * go to line (^_) the first two are standard across applications, and the last two are in the help menu that shows up by default.

> (^_) Confusingly, this is actually not a ctrl (^) shortcut at all. It is alt-g.

ctrl + underscore is go to line, column for me

Am I misunderstanding what you mean?

Post reply on HN