Bug#830580: Patch to install alternatives

Josh Triplett josh at joshtriplett.org
Sat Sep 24 19:29:15 UTC 2016

On Sat, Sep 24, 2016 at 01:10:18PM -0400, James McCoy wrote:
> Thanks for the patch!
> On Sun, Jul 10, 2016 at 11:27:23PM -0700, Josh Triplett wrote:
> > From 8d4641be71797ef7d54a3067f2c15cb374b73b16 Mon Sep 17 00:00:00 2001
> > From: Josh Triplett <josh at joshtriplett.org>
> > Date: Sun, 10 Jul 2016 23:21:37 -0700
> > Subject: [PATCH] Install alternatives for ex, rvim, rview, vi, vim, view, and
> >  vimdiff
> I don't think it makes sense to install an alternative for vi.  Neovim
> is explicitly dropping various "vi compatibility" pieces of
> functionality.

Neovim is still an implementation of vi, and acts like vi; it just
doesn't keep "bug-compatibility".  If you didn't have any other vi
implementation installed, I think it still makes sense for "vi" to
invoke nvim.

That said, I don't personally use the "vi" alternative, so I won't push
hard for that one.  But I do think it'd surprise users if they had
neovim installed yet the "vi" alternative didn't work.

> vimdiff and view I understand, since there are tools that explicitly
> launch them (and the latter is registered in the mime system with the
> vim packaging).

Both of those motivated this patch in the first place: vimdiff because
"git mergetool" invokes it, and view because my fingers are used to
typing it. :)

> ex, rvim, and rview I'm more on the fence about.  I guess it makes sense
> to provide them, since Neovim should be mostly a drop-in replacement.

And since Neovim does specifically have those modes available.

> > diff --git a/debian/neovim.postinst b/debian/neovim.postinst
> > index 9c30db0..9c66ca4 100644
> > --- a/debian/neovim.postinst
> > +++ b/debian/neovim.postinst
> > @@ -5,6 +5,13 @@ set -e
> >  update-alternatives --install /usr/bin/editor editor /usr/bin/nvim 30 \
> >                      --slave /usr/share/man/man1/editor.1.gz editor.1.gz \
> >                              /usr/share/man/man1/nvim.1.gz
> > +update-alternatives --install /usr/bin/ex ex /usr/bin/ex.nvim 29
> Why are these alternatives 29 when editor is on-par with vim.basic at
> 30?

I was trying to be conservative, to avoid surprising anyone who installs
neovim to experiment with it but expects "vim" to have complete vim

I don't have any objection to changing this, but I do think it might
surprise people.

- Josh Triplett

More information about the pkg-vim-maintainers mailing list