Skip to content

Comment on Pasting in command line Vim doesn't have to suck

Comments

Another method I sometimes use for pasting large blocks of code:

    :r !cat
    (paste your stuff)
    ctrl - D
Doesn't require any switching between paste modes.

Nice idea, and you can replace cat if you need to clean up the paste:

    :r!perltidy
    (paste coworker's ugly perl code)
    ctrl-D
and you have nice looking code pasted.

Interesting.... I see how it works, any other benefit to this approach?

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.