As a happy VI/VIM'er here for the past 10+ years, I use 'vi' as a shortcut to starting most editing sessions. During reading the O'Reilly VIM book, noticed something called Vile (Emacs with VI key mapping) and installed it. I just noticed some oddities today when trying to use the usual vi and found vile forces itself on the user by using 'eselect vi set vile' after installing! Technically, it probably should not do this unless a user specifically requests it done because when most issue 'vi', they expect VI (or VIM). A more proper solution would be to merrily recommend a user that they can link vile to vi by using eselect. Reproducible: Always On further research, this behavior started during and after vile-9.5-r1 and was instituted by Mike Kelly. >9.5 versions are not marked as stable, so VI/VIM users probably won't complain until they do go stable, but when they do, expect a lot of complaining if not fixed? ;-) /usr/portage/app-editors/vile/vile-9.8e.ebuild pkg_postrm() { -- einfo "Updating /usr/bin/vi symlink" -- eselect vi update ++ einfo "If you want vile for the /usr/bin/vi symlink:" ++ einfo "eselect vi set vim" }
See bug 187449. The ebuild should call "eselect vi update --if-unset" both in pkg_postinst() and pkg_postrm().
Using the latest nvi ebuild as a template... /usr/portage/app-editors/vile/vile-9.8e.ebuild pkg_postinst() { -- einfo "Setting /usr/bin/vi symlink" -- eselect vi set "${PN}" ++ einfo "If unset, setting /usr/bin/vi symlink" ++ eselect vi update --if-unset ++ einfo "You can manage the vi symlink using:" ++ einfo "eselect vi [gvim, vile, vim, ...]" } pkg_postrm() { einfo "Updating /usr/bin/vi symlink" -- eselect vi update ++ eselect vi update --if-unset } I think the nvi (& vim ebuilds) could also use the additional "You can manage the vi symlink using: eselect vi" einfo notice too. (FYI: vim & gvim ebuilds is absent of the above pkg_postinst() & pkg_postrm() functions.)
Let me know if this is a viable solution and I'll submit a formal patch. (Ping the gvim/vim & nvi maintainers with this suggestion too so that we can get some feedback? It's likely possible they'll get their own ideas, too.)
Ran into this problem again. Think I'll just uninstall the VIM alternatives to prevent this nasty bug from biting me in the tushy again. Second time I ran into it, and couldn't figure out why filetype and keys were acting funky! Wish I had write access, as even I would have fixed this dumb bug by now.
@VIM herd: If you don't have objections, I can commit the fix for you.
Fixed in CVS. As for the extra info, I'd rather only add that to eselect-vi rather than adding it to every single vi compatible editor.
Thanks. (Thought I'd see more feedback, since VIM is so popular.)