TL;DR: set BUNDLER_EDITOR, GEM_EDITOR, EDITOR, VISUAL to your favorite text editor, i.e.:
export VISUAL='nvim -n' export EDITOR='nvim -n' export BUNDLER_EDITOR='nvim -n' export GEM_EDITOR='nvim -n'
gem open command will look for
bundle open command will look for
If you don’t want to think about which editor will open, just set them all into one part of your rc file.
Seems for most command line tools that requires some editor at some point (e.g.
it will typically look for
$EDITOR as well. So setting them both seems to be a good default.
One more thing: I just learned that the
.zshrc files and the like means Run Command.
If you’re into history, here’s a short historical reference of the said abbreviation.