6 ms·
Why 'sudo Vim' Could Hurt Your Productivity
- SteveDeFacto 10y agoI see no reason to ever run vim as sudo. The best option in my opinion is to save files using ":w ! sudo tee %" This way you are not opening your system up to potential exploits within vim plugins. It also avoids issues such as this one.
- viraptor 10y agoIt makes no difference. If you got a plugin injected, you lost already - it can create a local sudo alias which either captures your password, or hijacks the next sudo command you run.