How to achieve “paste -d ' '” behavior out of the box in Vim?

后端 未结 2 1109
孤街浪徒
孤街浪徒 2020-12-24 15:55

Can Vim do something to the effect of the paste -d \' \' shell command, other then by running it via :r !paste -d \' \'?

What are the nativ

2条回答
  •  萌比男神i
    2020-12-24 16:22

    My UnconditionalPaste plugin has (among others) the gdp and gdP mappings that paste the contents of a register as the minimal fitting (i.e., non-rectangular) block with a queried separator, just like paste -d {sep} would do.

    Like in @ib.'s excellent answer, this would first require yanking the source buffer into a register.

    Demo: Using UnconditionalPaste plugin to emulate the paste command

提交回复
热议问题