Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
sudo -E command_to_run
sudo $(which command_to_run)
sudo env "PATH=$PATH" nvim
The "correct" way is to update the secure path using the commanding sudo visudo.
For more discussions, please refer to …