Waffelson@lemmy.world to linuxmemes@lemmy.world · 1 year agoWhen you realized you forgot sudolemmy.world1271
6When you realized you forgot sudolemmy.worldWaffelson@lemmy.world to linuxmemes@lemmy.world · 1 year ago12
Show Contenthuginn@feddit.it1·1 year 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
Show Contenthuginn@feddit.it1·1 year agoYeah learning about tee from this thread honestly. It’s been interesting realizing I had such a useful tool at my disposal but never knew
Show Contentrtxn@lemmy.worldMEnglish1·1 year agoNow I understand how the Adeptus Mechanicus feel when they perform a ritual power-on.
Show Contenthuginn@feddit.it1·1 year 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
Lazier way:
:w !sudo tee %
Yeah learning about
tee
from this thread honestly.It’s been interesting realizing I had such a useful tool at my disposal but never knew
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