10
$ update-alternatives --list editor
/bin/nano
/usr/bin/code
/usr/bin/vim.tiny

update-alternatives --list editor does not show nvim which I installed using snap. Even though my PATH variable contains /snap/bin. How do I fix this?

Akash Karnatak
  • 385
  • 4
  • 17

1 Answers1

13

Not all packages register themselves as an alternative. You can manually add nvim as an alternative for editor using update-alternatives.

sudo update-alternatives --install /usr/bin/editor editor /snap/bin/nvim 1111
Kulfy
  • 17,416
  • 26
  • 64
  • 103
  • This is why I'll be staying on 18.04 for a while longer. Maybe migrate to some other Debian derivative. – RonJohn Jan 03 '21 at 07:37
  • 2
    @RonJohn I don't think this has to do something with Ubuntu. May be it's a snapcraft thing. Anyway, the first thing I always do on a new installation is `sudo apt purge snapd`. – Kulfy Jan 03 '21 at 09:19
  • Isn't Ubuntu moving to mostly a snap-based environment? – RonJohn Jan 03 '21 at 16:04
  • @RonJohn As long as it's Debian based, I won't mind. I can still find deb packages. I'm currently using 20.04 and I don't miss snaps :) – Kulfy Jan 03 '21 at 16:09