• huginn@feddit.it
    link
    fedilink
    arrow-up
    27
    arrow-down
    1
    ·
    2 years 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