I want to set nvim(Neovim) as my default editor, I have tried to edit my .bashrc and add this two line:
export EDITOR=nvim
export VISUAL=nvim
and then
$ source .bashrc
but it didn't work. Proof:
$ sudo visudo
visudo: no editor found (editor path = /usr/bin/vi)
How can I set that correctly?