If you're editing config files with vim and need to use that sudo tee hack, stop.
You should be using sudoedit. It safely copies the config to /tmp and runs $EDITOR as your regular user with your user config, and only overwrites the file you're editing if you actually save. This is far more desirable than running your editor as root.
If you're editing config files with vim and need to use that sudo tee hack, stop.
You should be using
sudoedit
. It safely copies the config to /tmp and runs$EDITOR
as your regular user with your user config, and only overwrites the file you're editing if you actually save. This is far more desirable than running your editor as root.Very good point, I think that we should never use sudo vim.