Or use the chmod command to change the permissions of the file right?
Idk about you guys but I'm not particularly comfortable with running vim through Super User all the time. But maybe that's just being paranoid?
I'm a self-employed developer who doesn't really like primarily defining himself by his income source. Check out my website and other stuff to get a better - but still woefully incomplete - idea of...
Sometimes you want the permissions staying the same, but you need the file changed regardless. Maybe this is bad practice, I dunno. Would be curious to hear it discussed by folks who know more than I do.
This 'trick' alleviates the need to run vim itself as root. Changing permissions is not always preferable. How do you edit system configs? Full blown root user?
Or use the chmod command to change the permissions of the file right?
Idk about you guys but I'm not particularly comfortable with running vim through Super User all the time. But maybe that's just being paranoid?
Sometimes you want the permissions staying the same, but you need the file changed regardless. Maybe this is bad practice, I dunno. Would be curious to hear it discussed by folks who know more than I do.
This 'trick' alleviates the need to run vim itself as root. Changing permissions is not always preferable. How do you edit system configs? Full blown root user?
Your paranoia has caused you to be less safe...
sudoedit
(orsudo -e
) is the right way to do when you have not yet open the file with Vim.