Live data from Hacker News

GNU nano is my editor of choice

ariadne.space

71–80 of 236 posts

Re: GNU nano is my editor of choice

#71

>Hopefully this post demonstrates that nano is a quite capable editor in its own right. This post showed how to add a slightly enhanced minibar, remove the help and add syntax highlighting. It would be more important for me how to quickly navigate text.

you can also quickly navigate text.

Re: GNU nano is my editor of choice

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

no, it is control underscore

alt g is another binding for the same.

Re: GNU nano is my editor of choice

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

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

Re: GNU nano is my editor of choice

#75
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!

Re: GNU nano is my editor of choice

#76
post #40
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…

Quoted post unavailable.

>And if you have an especially strong opinion, I'll consider you even more experienced, even if your strong opinion differs from mine; simply by virtue of having of strong opinion it means you likely have been using it for years and have found other tools inadequate for your skills.

If you really think strength of opinion indicates experience, then clearly you don't have a lot of experience with people...

Re: GNU nano is my editor of choice

#77

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…

There are many parts to answering this.

First, "plain" text editors have caught up with IDEs in many ways that you're talking about here. With a good LSP plugin, you can hop to definition and autocomplete perfectly fine. For a strong statically typed language, the editor can even tell you why it won't build and how to fix it before you even try. Many things you used to need an IDE for just no longer require it.

Second, even without those tools, people hacking away at a keyboard are often doing a lot more than just writing executable code. You're editing config files, READMEs, comments, documentation templates, test data, API request examples. None of these things are amenable to any of the niceties an IDE can help with.

Third, in a microservices world or even just working on a plain library that calls into lots of other libraries, unless you download the source code for every dependency, hop to definition and autocomplete isn't guaranteed to work anyway. It's often easier to pull up the API documentation in a browser on a second monitor and refer to it while working. Screen real estate is cheap these days and the more mature projects you're better off using as dependencies anyway tend to be pretty well documented.

Fourth, an increase in the use of dynamic languages has brought with it an increase in dynamically-generated code. There's a lot of convenience here in reducing the amount of boilerplate you need to type out and being able to change behavior without even having to rewrite the core code, but it also makes IDEs less useful. It pushes the mental burden of understanding how code gets generated and runtime objects get decorated and changed by understanding the underlying data model of the language and its runtime, but hey, that's what we're paid for.

Fifth, what does it even matter in the grand scheme to have definitions and names more readily available inside the actual window you're typing into? It's a convenience, sure, but if you type subst when it should have been substring, you try to build or run a test or just a static analyzer or whatever and you get an error message and remember "oh yeah, that's Language X and I'm writing Language Y," you lost what? A minute at most to go do a global find and replace? Compared to the time studying a problem domain, designing and vetting a solution, coming up with adequate test cases and a suitable type representation that models the domain, the time spent literally typing out function names is minuscule. I'm not going to say saving seconds there is worthless, but it's not a huge gain.

Re: GNU nano is my editor of choice

#78
post #40
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…

Quoted post unavailable.

> It's not gatekeeping,

> you bet I will judge your ability to code by your preference of editor,

FYI. That's called 'gatekeeping.'

Re: GNU nano is my editor of choice

#79
post #40
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…

Quoted post unavailable.

Many of the things you mention are absolutely in nano :) Like highlighting, jumping to a line, importing.. I don't have the time to do a point by point comparison but trying nano for 5 minutes doesn't equate knowing it, just like with vim.

I'm not big into coding anymore and nano is handy for my muscle memory, coming from DOS :) It's good enough for my purposes. Sure vim is more powerful but it's not as accessible to the casual user. It's a good tool for its job just like vim is. They're just different jobs.

Re: GNU nano is my editor of choice

#80
post #13
post #3

How do you navigate text in nano?

* 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.

Hell, even the mouse scroll wheel works.
Post reply on HN