• @huginn
    link
    263 months ago

    Lazy 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

    • @rtxn@lemmy.world
      link
      fedilink
      English
      283 months ago

      Now I understand how the Adeptus Mechanicus feel when they perform a ritual power-on.

      • @huginn
        link
        103 months ago

        It’s funny how years of use make that so intuitive but spelled out it’s a garbled mess

      • @huginn
        link
        23 months ago

        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