11
$ 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?

1 Answer 1

14

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
4
  • This is why I'll be staying on 18.04 for a while longer. Maybe migrate to some other Debian derivative.
    – RonJohn
    Jan 3, 2021 at 7: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 3, 2021 at 9:19
  • Isn't Ubuntu moving to mostly a snap-based environment?
    – RonJohn
    Jan 3, 2021 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 3, 2021 at 16:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .