Waffelson@lemmy.world to linuxmemes@lemmy.world · 9 months agoWhen you realized you forgot sudolemmy.worldimagemessage-square38fedilinkarrow-up1360arrow-down117
arrow-up1343arrow-down1imageWhen you realized you forgot sudolemmy.worldWaffelson@lemmy.world to linuxmemes@lemmy.world · 9 months agomessage-square38fedilink
minus-squarehuginn@feddit.itlinkfedilinkarrow-up27arrow-down1·9 months agoLazy vim way I do it: ggVG"wY:q! followed by sudo !! then VG"wp:x Grab entire file and stuff it in register W Exit file Reopen sudo Select all and replace with register W them write
minus-squarertxn@lemmy.worldMlinkfedilinkEnglisharrow-up28·9 months agoNow I understand how the Adeptus Mechanicus feel when they perform a ritual power-on.
minus-squarehuginn@feddit.itlinkfedilinkarrow-up10·9 months agoIt’s funny how years of use make that so intuitive but spelled out it’s a garbled mess
Lazy vim way I do it:
ggVG"wY:q!
followed bysudo !!
thenVG"wp:x
Grab entire file and stuff it in register W
Exit file
Reopen sudo
Select all and replace with register W them write
Now I understand how the Adeptus Mechanicus feel when they perform a ritual power-on.
It’s funny how years of use make that so intuitive but spelled out it’s a garbled mess