Hacker News new | ask | show | jobs
by samtheprogram 615 days ago
Second this. Just change the EDITOR variable.

You’re getting downvoted (probably because of the mini Vim tutorial in #2) while the author of the post wrote a whole TUI because they didn’t know to change their EDITOR variable.

Learn your tools, people. This is the equivalent of a contractor taping rulers together because they didn’t realize their bag comes with a tape measure.

2 comments

> Learn your tools, people. This is the equivalent of a contractor taping rulers together because they didn’t realize their bag comes with a tape measure.

I feel like this is one of the big things we lose when working completely remote and disconnected: missing out on all these chances to help each other. We don't know the things we don't know.

Imagine OP was going to do a rebase -i, sitting next to a teammate and said, "man, I would do anything to be able to use interactive rebase without having to learn vim", and their teammate turned back and said, "Oh, you can use any editor you want".

No. Didn’t you hear? There’s zero benefits to working in an office, at all. It’s all lies because of commercial real estate or something. /s
It's GIT_EDITOR first, then EDITOR if GIT_EDITOR is not set.
Yes, but EDITOR is also read by a lot of other tools. And if you want to use a particular editor with git, and didn’t know about EDITOR, you probably want to set EDITOR so that when other tools open an editor it will be the same one.

But if you already have that and want something specific and different for just git then yeah GIT_EDITOR.

    git config --global core.editor "vim"