Notes on switching to Helix from vim

Notes on switching to Helix from vim

Julia Evans

I haven’t blogged for a while and I forgot how internet commenters can get bizarrely angry about statements like “I got tired of managing my vim config so I decided to stop using vim for now”, as if it’s some kind of attack on vim (or on them??)

It makes me really appreciate @grimalkina’s work on developer culture, like this https://osf.io/preprints/psyarxiv/2gej5_v2

I still have a lot to learn but her work has helped me start to understand where this stuff comes from

(I used vim for a long time and I love it!)

OSF

@b0rk @grimalkina I was astonished when I said in a talk that the C++ macro feature was bad and people got mad at me. I thought it was self-evident and that even big fans of C++ would agree with me that the macro system was one of the worst parts of the language.

Instead they just got angry.

@b0rk @grimalkina A while back I was helping my kid with her CS class homework and sent her a followup email observing:

“You lost a lot of time and energy dealing with issues like: Using vim; copying files back and forth with scp; losing the network connection; the college shared machine is slow and yucky.”

“It's important to remove as much friction as possible from your basic process. Otherwise it's like trying to cook with dull knives and rusty pots, except worse because it interrupts your train of thought. You can't do good work with bad tools.”

“When you start the next project, start it in VScode in the beginning. And maybe set aside an hour or two before you start in earnest, just to go through the VSCode tutorial and familiarize yourself with its basic features, without trying to do that at the same time you are actually thinking about your homework. This will pay off quickly.”

Then I published the letter on my blog and boy oh boy did I get a lot of hate from the vim fans.

But the simple fact was, she lost a lot of time and energy dealing with vim.

@mjd @b0rk this is making me feel great about working in VSCode lol

@grimalkina

Looking forward to reading your article BTW. I have been thinking about these issues for a long time.

@mjd @grimalkina @b0rk I like this. I guess VSCode here is just an example of a favorite $EDITOR that is discovered through personal experimentation and conversation: maybe your kid will like using zed or cursor, or ... emacs, lol. I want to believe there are still people on the Internet who try to help you along your way.
@ink @mjd @b0rk I just use what the nicest engineers I know tell me would be good to use and don't trouble myself with the social identity signaling that's supposed to go along with all this. I am free 😂

@grimalkina @ink @mjd @b0rk I have nothing against making it easier for new developers, but there's other reasons for using and recommending tools that are perhaps harder to use besides the reasons you mentioned.

It's hard to get out of Big Tech's walled garden once you're in it (and you can see where that has led us).

The recommended open-source tools offer a stable platform that'll be with you for decades and work in a lot of different environments.
That's worth something as well.

@aerique @ink @mjd @b0rk risk is also introduced for many of us by communities that are demonstrably interested in being racist and sexist

@grimalkina @mjd @b0rk I’ve been using vim since I was a kid. I have used it for a lot of projects over the years, professional and personal.

I don’t use vim for work anymore. I use the thing that will definitely work and is easy to get to a known good state. Vim is a great editor. But VS Code is the gold standard.

@b4ux1t3 @grimalkina @mjd @b0rk I've been using some form of vi (mostly vim) for nearly thirty years, and I still love it for tasks that only involve a handful of open files. But for anything larger I want a real IDE, and for the last five years that's been VS Code. The modern vim experience seems to start with installing and configuring a zillion plugins, and I just want an editor that basically works out of the box, to which plugins can be easily added if needed. That said, I'm currently trying out a vim-emulating plugin in VS Code. Not totally sure I like it, but it definitely makes some forms of text-manipulation easier.

@pozorvlak @b4ux1t3 @grimalkina @mjd @b0rk I regularly use vim, notepad++, and VS Code each for different reasons or to solve different problems. Lately gvim has been "helpfully" autoindenting and inserting [expletive] tabs into my text and I have not spent the time to figure out why this is happening or (more importantly) how to disable it permanently.

I have zero plugins installed; every time I look into vim plugins I waste 2-3 days trying to make anything work and the time spent is never worth it.

I was forced to use vi back in 1986 because the alternative was ex. Emacs was not available for some reason, probably due to limited disk space (it didn't seem like it at the time but I feel I dodged a bullet there...)

I find VS Code is good for complex projects, vim is good for precise bulk editing, and npp for when I want to just want to write without doing much editing.

@mjd i did a podcast interview once where someone asked me why developers should learn vim and I said something like “I don’t know, maybe they shouldn’t! people should use what they like”

the attitude that people “should” use it is so baffling to me

@b0rk I learned vi first. (No vim yet then.) After a year or two I encountered emacs, decided it was obviously better, and put

alias vi=emacs

in my rc file to force myself to make the switch.

VS Code is much, much better for me than either one ever was.

@mjd @b0rk I use VSCode pretty much 100% these days except for "command line tool pops up an editor" type tasks where I just use vi.

@mjd @b0rk I was an emacs guy before switching to IDEs, and one of the main reasons was that I became really good at using the emacs merge tool for manual code merges, which tended to be much more frequent and heavyweight in the days before git. Emacs merge could do a lot of the automation that the source control system wouldn't.

Git tends to boil manual code merging down to the point that VSCode's simple treatment of merge markers is good enough to deal with it 99% of the time.

@b0rk @mjd

In my subjective experience, using vim has probably saved me at least net 1000 hours of time over my decade-plus of programming projects, and I'm not even a full-time developer. I probably didn't break even on time saved within a year though.

I think that this subjective experience (along with a dose of toxic kids-these-days pride) is what prompts the misguided "everyone should use it" line.

I'm mature enough to recognize that the same time savings won't necessarily materialize for all my students, and that in different ways, emacs might have saved me 1000+ hours too. I make sure there's a vim section of our course's recommended editors page but I don't push anyone away from vscode, which is the default. I don't believe everyone should use vim, even though in theory I think it could be a net time savings over the long term for a lot of people, because that theory is only sometimes borne out in reality.

@b0rk @mjd Same here - vim's my editor of choice, but there are so many things that I think are generally more useful for programmers to learn than vim, so it's not something I've ever recommended people go out of their way to learn.

@b0rk @mjd I feel like vim is something you can try if you want to. If you like it, then you have a free new tool to play with. If you don’t like it, then you should stick with whatever you already have.

Notably, neither choice makes any difference on whether the code you write will be any good.

@b0rk @mjd I think though it’s easy to see someone talk about what you’re choosing as having issues and feel upset. I.E. I don’t like reading lots of articles that suggest MacOS sucks. I’m kind of aware of the shortcomings and I use it (right now) regardless.

The issue, I think, is that it’s hard to read a headline and go “oh yeah, this is probably something I wouldn’t enjoy reading”. (1/2)

If I were a die hard fan of Vim, I probably would not click on an article talking about moving away from Vim to Helix. (2/2)

@mjd it's easier for me to understand your post getting hate than @b0rk's.

Yours really does read as if you're saying vim is an objectively bad tool. First, you're making that recommendation to someone other than yourself in the first place. But also you make _separate_ recommendations to (a) spend an hour learning the editor before you're also trying to write code at the same time, and (b) use something other than vim. That definitely sounds to me like "the problem is not just that you hadn't learned vim in advance, the problem is also vim itself".

Whereas @b0rk really did just say "this is my preference", and not even that, more like "I'm trying out this thing to _see_ if it's my preference". If the hate-mail from vim fans had come to you but not her, that would have made perfect sense to me!

That said, I do agree that vi-type editors in general are a strange choice for a new user. It used to surprise me whenever I saw a novice choose vim, until I realised that gvim makes it easy to ignore the scary parts (https://hachyderm.io/@simontatham/114177885089067364). But then I'm also not a vim user myself, so perhaps the vim diehards would consider that my opinion still doesn't count :-)

Simon Tatham (@[email protected])

@[email protected] I had a colleague a few years ago (not 20 or 30) who I was surprised to find used gvim, because they didn't otherwise seem like the kind of person who would do anything in an extra-complicated way if they didn't have to. But after watching them use it for a while, I realised that you can (and they did) use gvim just like a normal GUI text editor, by never pressing Escape so that it stays in insert mode all the time, and using the GUI toolbar for any editing action more complicated than the arrow keys or PgUp/PgDn/Home/End. You can treat it as not very different from Notepad … except that when a vim-using colleague comes over to help, they can use all the extra power to do magic. I suspect someone had recommended it to my colleague on that basis. And then you can learn the magic yourself, at your own pace, as and when you have spare time and someone to show you a trick. This week it's Notepad; next week it's Notepad except that you know two or three magic spells of the form ESC + mystic incantation + i which cause something powerful to happen; maybe next year you start learning to craft your own spells. So my theory is that gvim is the gateway drug to the hardcore 'use keyboard command mode most of the time' style of vim.

Hachyderm.io

@simontatham @b0rk True! Vim hadn't worked well for her, we tried VS Code, and that worked better. It is easy to read my post as general advice to everyone, and many people did this, but it wasn't, it was only advice to one person in one circumstance.

I titled the blog article “Advice to a novice programmer.” Not “Advice to novice programmers.” But I understand that many people took it as the latter.

@simontatham @b0rk I also must admit that I did not simply say that the C++ macro system was bad, I said that it blows goat dick. I have learned since then that my specific phrasing can have a large effect on how people respond to my ideas.
@mjd @simontatham @b0rk honestly, I think you were too kind to it.

@mjd @b0rk advice to one person _which you then chose to republish to the whole world_ surely comes with at least some kind of implicit "... and I think this is likely to be helpful advice for other people too"!

And rightly so – I happen to remember that particular blog post of yours well, because I've cited it to novice programmers myself. (But usually I'm referring to other parts of it, not the choice of editor.)

@simontatham @mjd @b0rk In context, I read the advice about editors as "don't burn cycles on figuring out a notoriously complex and unintuitive power tool when you're on a deadline and there's an easier alternative available" rather than "vim sux". But alas, people.

@pozorvlak @simontatham @b0rk Now there's a *great* application for the LLM: “Hey, Claude, vim is confusing for me, what could I use instead?”

And it will provide three or four suggestions, short, accurate descriptions, and a followup question asking you to say what qualities you are looking for.

Then you can talk it over and its recommendation will be as good as anyone's.