Skip to content

Instantly share code, notes, and snippets.

@avsej
Created April 11, 2010 09:46
Show Gist options
  • Save avsej/362615 to your computer and use it in GitHub Desktop.
Save avsej/362615 to your computer and use it in GitHub Desktop.
install alternatives for vim
#!/bin/sh
set -e
pkg=vim
mandir=/usr/share/man
bindir=/usr/local/bin
priority=30
update-alternatives --install /usr/bin/vim vim $bindir/vim $priority
update-alternatives --install /usr/bin/vimdiff vimdiff $bindir/vim $priority
update-alternatives --install /usr/bin/rvim rvim $bindir/vim $priority
update-alternatives --install /usr/bin/rview rview $bindir/vim $priority
for i in vi view ex editor ; do
update-alternatives \
--install /usr/bin/$i $i $bindir/vim $priority \
--slave $mandir/man1/$i.1.gz $i.1.gz $mandir/man1/vim.1.gz
done
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment