I often open a file in vim, make some changes and when it's time to save the file is read-only.. (owned by another user). I'm looking for tips on how I could re-open the file
as root and keep my changes without first saving it to a temporary file for copy or re-edit
as root.
Vim – Re-Edit as Root
rootsudovimvimrc
Best Answer
From this stackoverflow answer, by skinp