[Sussex] Ubuntu Vi

Steve Dobson steve.dobson at syscall.org.uk
Sat Dec 13 14:16:33 UTC 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

John

John Patrick wrote:
> I've lost vi.

I am going to assume that you mean nvi (new vi) which is the closest to
the BSD version of vi.  nvi claims "bug-for-bug compatible" with BSD vi.

> I was trying to update ubuntu 8.04 to add vi as the default editor and
> in the process I have lost vi and replaced it wil vim.
> 
> I was running:
> 
> sudo update-alternatives editor ...
> 
> But messed up the command line and seams to trash /usr/bin/vi
> 
> I've tried apt-cache search vi but all can see if vim.

nvi should be listed also as it is part of the main set.  At least on
Debian it is.  If installed it can be found in /usr/bin/nvi

> Any hints or tips to try and get vi back?

The command

  $ sudo apt-get install --reinstall nvi

should reinstall the nvi package if there is any problem. But first try
using the command "nvi" instead of vi and see if that works.

To reset the alternatives link you can use:

  $ sudo  update-alternatives --config editor

And you will then be give a list of editors to choose from.

Steve


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJQ8Owu7HOw0Q66oERAivgAJ49zKvx9DEHU3nfg8vgo6cGKWh8mgCfdenR
EUfgSncnooJRhoYeGIUZyf4=
=Vl9F
-----END PGP SIGNATURE-----



More information about the Sussex mailing list