r/programming • • May 23 '17

Stack Overflow: Helping One Million Developers Exit Vim

https://stackoverflow.blog/2017/05/23/stack-overflow-helping-one-million-developers-exit-vim/
9.2k Upvotes

1.1k comments sorted by

View all comments

Show parent comment

3

u/aktivb May 24 '17

crontab or visudo (name notwithstanding) dumped you into nano instead of vim.

vi is part of the POSIX and the Standard UNIX specifications. It is guaranteed to exist on any compliant system, nano isn't. That's the reason vim doesn't stay in its special corner (or rather has a special corner as the default editor), and that's not up to the different flavors/distros to change either.

crontab -e dumps you in $EDITOR. visudo can be compiled to do as well, but that comes with its own issues. This, as well as provide alternate frontends, is what distros can do, but there's good reason why vi/vim is the default for the tools in question.

1

u/samling May 24 '17

Interesting! I didn't know that. Thanks for the information. Ultimately I feel like this just furthers the case for knowing basic vi(m) usage, if it constitutes part of a standard spec, although I can understand the frustration at being essentially forced to learn what most would consider an unorthodox editor by today's standards.

3

u/aktivb May 24 '17

I think the 'forced to learn' angle is a bit overblown. crontab and visudo is not really something you launch every day, and any 'how to config your first crontab/sudoer' tutorial will include how to edit and save/quit in vi. It would probably be less of a problem/meme if all *nix users actually were forced to use vi every day.

POSIX compliance is voluntary, most linux distros are 'mostly' compliant. My home distro, Gentoo, comes with nano as the default editor and vi/vim is not on the default minimal install (though vim is available on the install medium). As someone with vi(m) ingrained, being forced into nano is painful and sluggish, because it's so much slower to work with. There's good reason vim and emacs still tops the popularity charts in spite of notorious learning curves and predating general user friendliness conventions.