Install Vim to /bin?

Jan Dvořák mordae at
Mon Mar 26 05:29:00 PDT 2007


 > The other option is to create shell scripts for /bin/vi and /bin/vim
 > to search for the syntax directory and use or not use /etc/vimrc
 > accordingly, but this
 > would do exactly what vim already does except it would do it slower
 > (and twice in total).
is it really *that* bad?

mv -v /usr/bin/vim /bin/vim.real
cat >/bin/vim <<EOF

[ -d /usr/share/vim ] &&
	exec vim.real "${@}"
exec vim.real -Nu NONE "${@}"

ln -sfv vim /bin/vi

Just tried it on my system and seems to be OK. I don't notice any vim 
startup slowdown. I also thought about having it as a function in 
.bashrc, but since one can boot with init=bin/bash, he won't get the 
proper setup...

About elvis... I prefer vim and if you really want to have a 
minimalistic vim, install it twice -- once with full feature set and 
once only with minimal. We can even make it so `vi` != `vim`...

More information about the hlfs-dev mailing list