$ update-alternatives --list editor

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?


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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.