28 ms·
Most of the time I've seen people get stuck in vim is when they use "git commit" which opens up whatever you have $EDITOR set to. The default value in most dist
by onei 4y ago
Most of the time I've seen people get stuck in vim is when they use "git commit" which opens up whatever you have $EDITOR set to. The default value in most distros I've used in vim/vi and I can't recall seeing usage help in that scenario.
- soraminazuki 4y agoTrue, but at least it points you to the :help command at the beginning of its man page and pressing ctrl-c tells you how you can quit.
- AlchemistCamp 4y agoWhat distros do you use? One of my ongoing irritations with Ubuntu is that the default editor is not VIM.
- kevin_thibedeau 4y agoJust change it to what you want.
- AlchemistCamp 4y agoI do... every time :)
- onei 4y agoY'know, now that you mention it, I don't recall changing the default editor in Ubuntu. I think I first noticed vi or vim as the default editor in Fedora around 6 years ago, and maybe also in git bash on Windows. Beyond that, my memory is hazy, but I think vi or vim is the default in Debian and RHEL/CentOS, but I wouldn't put money on it.
- dEnigma 4y agoI voiced my strong support when they changed the standard git editor on my distro from vim to nano. While I'm still playing with the thought of really getting into vim and/or emacs at some point, nano is just a much simpler, more familiar type of editor. Seems like a lot of other people also felt that way. Depending on your user base it might make sense to stick to vim though, in case you'd disappoint your more technical/unixy users.
- adamomada 4y agoI’ve always had the idea that EDITOR should be on the same level as the login shell on nix systems. Choose your shell and your editor when creating your account, or don’t complain about the defaults
- Anthony-G 4y agoI agree but I’ve found that a lot of users don’t know they can set EDITOR in their shell profile – or that the `chsh` command exists to let them change their login shell.
- adamomada 4y agoYeah the “create your account” part of the install should expose a few more settings such as the above, or perhaps a more generic “user account settings” pane in the major DEs to show the most common environment configurations for user accounts
- onei 4y agoI am one of those that didn't know chsh was a thing - thanks for the tip!
- alpaca128 4y agoAs a Vim user I agree. People who don't know about this environment variable might also not be very familiar with Vim. It helps nobody to surprise people like that. Also I like to use Vim's terminal buffer, and it turns out accidentally starting Vim inside Vim rarely leads to satisfying results.