Live data from Hacker News

GNU nano is my editor of choice

ariadne.space

161–170 of 236 posts

Re: GNU nano is my editor of choice

#161

> The vim vs emacs flame war I doubt that there is any ongoing vim vs. emacs flamewar. Most people are probably arguing about VSCode vs. JetBrains these days. My impression as an Emacs user is that if someone says they use Vim, I think "hey, one of us". (nano I guess falls into that category, but I bet nano users are missing out on some timesaving innovations from the last few years, and nothing frustrates me more th…

I wish vim had the option for CTRL-K/U behavior rather than having to do the unintuitive (to me) visual block.

[deleted]

Re: GNU nano is my editor of choice

#162
Issues.

1. When I google for "nano ctags", I get one hit: someone's 2011-dated blog about their custom "nanotag.sh" which searches through the tags file and then runs the editor to bring up the right line of the right file, which is kind of like walking a quarter mile to get water from a well instead of having running water.

Maybe Ariadne uses nothing but cscope for naviating through code bases? Cscope is a bit crippling; you use it as a kind of dashboard for searches to which you have to return to start another search. If you find occurrences of an identifier, you have to return to cscope to navigate through that list.

2. I don't see any documented support for running a compile job out of Nano such that it gathers the errors and lets you move around in them for fixing.

3. No mention of "lisp" in the manual. How is the Lisp auto-indent and such?

Ariadne talks about getting the editor to "look" like Vim, but I don't see the point. What does that mean? Vim looks more or less like ... a section of your file. That's what you see. Plus some syntax coloring; is that the point? Looks are only skin-deep; the semantics is invisible from just looking at the editor screen.

She presents a falsely incomplete set alternatives ("false trichotomy"): it's either Vim, Emacs or Nano. It has to be Nano because Vim is modal and Emacs Lisp is yucky (complete with a meme about Emacs being an OS with a lousy editor) (so why would the author care that there appears to be no Lisp editing support in Nano, right?)

But, say, about good old Joe? Joe has ctags support and stepping through compiler errors and such. It's substantially more suitable for programming than Nano.

By my estimation, Joe could be the editor the author actually wants.

Another unexplored possibility is Jed.

Re: GNU nano is my editor of choice

#163
post #88

Earlier quoted context omitted.

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.

People use minimal OS images when they absolutely have to, but the ideal case is just your binary sitting there all alone. (Sometimes you need the tzdata files, SSL certificates, and other support files. But rarely a shell.)

I agree that the ideal case is just a single binary with minimal supporting data, but people using OS images is certainly the norm not the exception. To suggest otherwise is ludicrous.

Re: GNU nano is my editor of choice

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

I will judge your ability to code by your preference of editor

If someone is turning out high quality code in what seems an awful choice of dev environment then I'd just shrug my shoulders and move on. I don't have the mental energy to work up disappointment or frustration at how another person might, counterintuitively, be just as productive using tools I don't like.

I think R is far superior to SPSS but really don't care if someone decides to use SPSS and produces quality analysis, especially if a lifetime of experience in it made them highly efficient in its use.

Re: GNU nano is my editor of choice

#166

Obligatory XKCD: https://xkcd.com/378/ "nano? Real programmers use emacs." "Hey. Real programmers use vim." Personally I use TextWrangler (BBEdit) for fun, and VS Code at work. I know how to exit vi though! "Q. How do you generate a random string? A. Put a Windows user in front of vi editor and ask him to exit." https://www.reddit.com/r/ProgrammerHumor/comments/72y7lr/q_h...

Do you write code in BBEdit? VS Code feels way more capable, at least at first glance, but I know BBEdit fans have a lot of love for it. I ask because I'm growing a little tired of VS Code. It works nicely, but it never feels like a native editor. BBEdit, and Panic's Nova, feel like I'm actually using a Mac. I'm trying to decide if either of those are better than (or at least as good as) VS Code.

Yes, I write my own code in BBEdit. When there's no collaboration needed, it's more than adequate, and the Mac integration (AppleScript API) is great.

VS Code is good for git blame integrations, finding references to functions in a deeply nested project, and using extensions. It's an IDE, not just a text editor.

So I suppose it depends on your use case: if you're the only developer, a text editor is enough. If you're working in a larger team, an IDE can be helpful.

Re: GNU nano is my editor of choice

#167
post #116

Earlier quoted context omitted.

This is even more common in the world of containers where “nice to have just for debugging” get omitted. You haven’t lived till you have to edit using only sed.

I did build a arch Linux install using cat <<EOF, grep and sed. But golly it gets tedious

Sounds like pain, but also a means to getting better at sed.

Re: GNU nano is my editor of choice

#168
post #143
post #98

Earlier quoted context omitted.

I may be misremembering, but the biggest differences I remember between vi and vim as a semi-casual user is vi defaults to not supporting arrow keys, and doesn't tell you the mode it's in.

I can't remember the last time I used vi and was unable to use arrow keys. That includes typical Linux installations (Vim, Busybox), Solaris (default is Vim, oddly, but I just confirmed arrow keys work in /usr/xpg4/bin/vi), and various BSDs (nvi). I'm not a power vi user, though. I usually use JOE (thanks/blame to '90s Slackware education), but occasionally vi is more convenient. It wouldn't be nearly as convenient w…

Raspbian, for example included vim-tiny

Re: GNU nano is my editor of choice

#169

Earlier quoted context omitted.

This is not multiple cursors. Ctrl+k is cut line, similar to yy Ctrl+u is paste, similar to p The difference is hitting Ctrl+k five times will put all those lines into a buffer. And Ctrl+u will paste those five lines. In vim, this is complicated. You could do 'y5' requiring to know/calculate the number of lines in advance. But more often then not you are going into visual mode, selecting everything, then y, then p. T…

Forgive me for misunderstanding the ambiguous comment, both C-k and C-u are associated with multiple cursors in VSCode [0] ;) I use the following mappings for emacs-ish editing in insert mode: " emacs-style editing & motion inoremap inoremap inoremap inoremap inoremap inoremap inoremap inoremap de inoremap D inoremap inoremap " restore support for digraphs to M-k inoremap `C-k` doesn't append to a "kill ring", but yo…

It isn’t silly nor did it require you to jump to the defense of vim’s behavior.

It was a simple statement that vim’s functionality can be clunky and with all of its flexibility, it cannot handle something as simple as nano/pico’s method for keyboard copy/paste.

It’s literally the one functionality I would love to become available in vim that exists in nano/pico which would make mine (and likely many others’) lives and efficiency better.

Re: GNU nano is my editor of choice

#170

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. Secon…

I'll try and respond to your points but hopefully without omnislashing.

On 1) I think that's why this post in particular triggered the question. I don't even conceptually understand what vim and emacs are. Like there are terminal buffers, there's an editing mode, you can't quit it without knowing some arcane ritual and org-mode is, like, wikipedia for to-do lists or something. These are very powerful pieces of software with programmability and plugins supporting e.g. autocomplete that bring them most of the way to an IDE. Nano on the other hand I have used when I need to edit some configs or files on a server and I am just absolutely bewildered at the idea anyone would do more than light text editing in it.

Which kind of leads in to the second point but not really. I prefer a specialised tool for each of those, where applicable. Like README or documentation I might use VS Code with Markdown preview or MarkdownPad2. For config files/hand crafted requests I might just use Notepad++ but increasingly VS Code fulfils this role too and will let you know if you've made a syntax whoopsie in a lot of file formats.

For the third I've actually found I prefer a single 13" monitor with a single window for programming. I feel like looking at API docs in a browser is just enough of a context switch that it will break my focus versus auto-completing to victory. I can actually remember the last time I looked at an API doc in the browser because it was today and I wanted to make a nerdy joke but didn't have the IDE open and couldn't remember if the method was WaitAsync or Enter. But otherwise I will use API documentation once in a blue moon. Most API documentation I just don't find helpful and since we rely on a lot of open source libraries in my job a lot of it is porbably either bad or non-existent. Perhaps this is a difference between people who learned programming when one did it by consulting the BASIC manual and then figuring out and typing the code versus a more IDE based way of learning? I'd guess the BASIC generaiton learned programming more methodically and more deeply.

On 4 my brain falls into this same trap of incomprehension with dynamic languages, though I'm interpreting this as dynamically typed which might be a misinterpretation. Re-reading I don't think that was the distinction you were making so I won't expand here.

Lastly, I've personally found the overhead to be a lot higher. Since this is a throwaway account I can't link to the PR but I recently did some JavaScript work in a big codebase in a text editor and even writing a fairly simple 50 line method felt like swimming through treacle. Not knowing what I had defined, what I could do with what was defined, where I'd used something that was just defaulting to global since it was undefined, where I'd made an obvious syntactic error etc. I'd say (for me on that codebase) the slowdown to my personal productivity was between 3-10x. Granted that was a codebase without tests, a linter set up, etc. and with low personal familiarity with JavaScript and working efficiently in raw text-editors but it's not an experience I ever want to repeat. Even with tests the time to run the tests, parse the test output, translate the error message and then apply the corresponding fix (and write the test in the first place) versus just fix what the red squiggly told you just seems intentionally less productive.

An additional 'finally' as a mea-culpa. I once tried to learn Pony since the language seemed interesting but every time I tried I just bounced off it because I felt so lost and unproductive having to use the API docs and tests/compiler workflow. People who are more used to that workflow probably have an easier time picking up new languages and codebases so while in my experience I'm in the top 20% of people in my language I have a poor generalist ability and low efficiency outside my specialization.

Post reply on HN