Sudoedit reverts back to nano after setting it to neovim

I’ve set neovim as sudoedit with:

export EDITOR="nvim"
export SUDO_EDITOR=/usr/bin/nvim

But after restarting it reverts back to nano as sudoedit.

All those commands do is export it for the current session.

If you want those to run for every session your user starts you can put them in ~/.bashrc

Or if you want them applied system-wide you can put them in /etc/environment without the export. ex:

EDITOR=/usr/bin/nvim
SUDO_EDITOR=/usr/bin/nvim
2 Likes

Don’t forget to log out and back in if you put it there. :slight_smile:

And if you put them there, then you may want to reboot for the changes to take effect. :slight_smile:

1 Like

That did the trick. Thanks :slight_smile:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.