Write vim file as super-user?
Fresh3 days ago
Mar 15, 20261179 viewsConfidence Score0%
0%
Problem
This is a usability problem that happens often to me: I open a read-only system file with vim, even editing it, because I'm not attentive enough, or because the vim on the system is badly configured. Once my changes are done, I'm stuck having to write them in a temporary file or losing them, becaus…
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Canonical Fix
Unverified Fix
New Fix – Awaiting Verification
Fix for: Write vim file as super-user?
Low Risk
Explanation: With , you can execute programs. By prefixing it with :w, the file's content (the stuff you have in vim, not the original file, more precisly: the buffer) will be given to the command on standard input. is replaced by the file name, and…
Awaiting Verification
Be the first to verify this fix
Sign in to verify this fix