Live data from Hacker News

GNU nano is my editor of choice

ariadne.space

51–60 of 236 posts

Re: GNU nano is my editor of choice

#51

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?

Ah, I don't know... I don't depend on an IDE, they just make things much quicker and easier for me.

And let's say I do depend on one.. it's not like I'm going to be dropped at a computer where I'm not allowed to use an IDE... but it would just take a day to adjust.

For me, anyway.

Re: GNU nano is my editor of choice

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

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.

Re: GNU nano is my editor of choice

#53
post #37
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…

The thing about that “snobbery and gate keeping” is that it’s not at all that. Maybe not everyone’s experience mimics mine but I felt like people looked down at me a bit when I was 16 for using nano on the command line. But, and here’s the kicker, if I hadnt been pushed into vim I would not be nearly as productive now. There have been countless times in my career as a sysadmin/devops/SRE where I’ve been stuck with ho…

Maybe not everyone’s experience mimics mine but I felt like people looked down at me a bit when I was 16 for using nano on the command line. … What I thought were people looking down on me were in fact people looking at me with hopeless pity, because I fought the idea of learning vim.

People need to check how they encourage other people or promote things. You probably weren’t wrong about feeling looked down upon. Even if they really thought you would benefit.

Re: GNU nano is my editor of choice

#55

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…

Thanks for your answer, out of interest what languages are you primarily working with and what sort of team and codebase size? It sounds like being forced to consider navigability would offset the tendency for codebase 'melt' in larger IDE assisted projects.

Also one area I lean heavily on an IDE is I can switch codebases up to 4 times in a day between JS and Java, so I'm not going to remember structure most of the time and being able to have all kinds of crutches helps me maintain velocity. Do you find your sense of navigation when swapping is enhanced because you have a deeper understanding of the structure from memory?

I'd say VS Code kind of straddles that middle ground, like an enhanced text editor++. But then full IntelliJ is where I feel most at home so obviously we have different preferences and that's fine. I just worry I'm missing out and heavily dependent on IDEs.

Re: GNU nano is my editor of choice

#57
post #10

nano was my cli editor of choice because I was overwhelmed by vim. For years I felt subpar and thought that I should learn using vim. I'm using vim for some years now but I don't really make much use of it's features, maybe an occasional cut and paste, which probably can easily be done with nano too.

https://vim-adventures.com/ is a fun way to flesh out your vim understanding. I've only been through the free bit and balked at the price tag, but very much enjoyed what I played and if I weren't already well versed in vim it would probably be well worth it to continue.

Re: GNU nano is my editor of choice

#58
post #50
post #49

Earlier quoted context omitted.

POSIX doesn't say anything about containers.

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 (they should create new processes directly).

Re: GNU nano is my editor of choice

#59
post #37
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…

The thing about that “snobbery and gate keeping” is that it’s not at all that. Maybe not everyone’s experience mimics mine but I felt like people looked down at me a bit when I was 16 for using nano on the command line. But, and here’s the kicker, if I hadnt been pushed into vim I would not be nearly as productive now. There have been countless times in my career as a sysadmin/devops/SRE where I’ve been stuck with ho…

+1 for vim. I also spent a lot of time resisting it. Now it's all I use because it's just so much better.

Re: GNU nano is my editor of choice

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

> (^_)

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

Post reply on HN