在这一系列的Vim命令中,norm dd"0P是什么?

Non*_*ona 1 vim

我正在做一个Vimgolf问题来改变这个:

First:
        Junk text.
Second:
        Junk text.
Third:
        Junk text.
Last:
        Copy these lines,
        and replace the text
        in each heading above.
Run Code Online (Sandbox Code Playgroud)

对此:

First:
        Copy these lines,
        and replace the text
        in each heading above.
Second:
        Copy these lines,
        and replace the text
        in each heading above.
Third:
        Copy these lines,
        and replace the text
        in each heading above.
Last:
        Copy these lines,
        and replace the text
        in each heading above.
Run Code Online (Sandbox Code Playgroud)

一个解决方案是:

:8,$y<CR>:g/J/norm dd"0P<CR>ZZ
Run Code Online (Sandbox Code Playgroud)

:g/J/norm dd"0P做什么?我知道"J"加入了行,":g"是全局的,但我不了解其余部分.

小智 6

分段:

因此,这将替换当前行与被阻止的块.