Ever wonder why vim
loses its color schemes and settings when you are in sudo
mode? I hate it. But there’s a way to preserve your vim
settings while in sudo
mode.
sudo -E vim some_file.txt
The
1 | -E |
switch is the holy grail. Or you could use sudoedit
if you have it set to using vim
. And it’d have the same effect.