TL;DR: title. It's to avoid exposing your system to vulnerabilities in your editor.
Hello all! Today, I want to adress one of my pet peeves : people using sudo to run their editors as root. This is bad because of two things :
- It leaves your system vulnerable to any exploits involving your editor. You may also be prone to user errors.
- But worst of all, it makes it so your editor ignores its configuration ! Your carefully crafted
.vimrc, your beautiful.emacsconfig, all ignored !
Instead, set your $EDITOR environment variable, and use either sudoedit file or sudo -e file.
Thanks for reading.
SOCIAL SHARE CARD GENERATOR