On Debian-based systems the alternatives system handles both the
vim executable. So if
vim is installed and you execute
vi, you also get
vim, which I find very nice, because I absolutely hate classic
On Fedora 17 "Beefy Miracle", the alternatives system obviously doesn't handle none of the two. But there is a profile file in
/etc/profile.d/vim.sh which adds a shell alias to make
vim. For some reason it does not do that for system users, including root.
But even if I set up an alias for all users manually, when I call
sudo vi I'm starting classic
vi instead of
vim. That's probably because sudo doesn't start a shell or profile files are only executed in interactive shell sessions.
What I'm looking for now is a way to uninstall classic
vi completely to make a symlink that even survives system updates. How can I remove classic
vi but not
vim on Fedora 17? Or is there even a better way?
yum provides vi I found out that
vi is provided by the package
vim-minimal. But I can't simply remove it because it automatically removes the package
sudo with it. Even if I do remove it, and try to install
sudo again afterwards,
vim-minimal is then again installed as dependency.
Update: As requested, output of
rpm -qf /usr/bin/vi:
ls -l /usr/bin/vi:
-rwxr-xr-x. 1 root root 782248 13. Feb 2012 /usr/bin/vi