在Vim中是否有等同于o- <esc> -p?

Cat*_*ton 1 vim keyboard-shortcuts copy-paste

当我抽出整行并按下时p,由于换行符,Vim会创建一个新行来放置被拉动的文本.但是,如果我拉出一条线的一部分是否有办法将那个被拉动的文字放在一个新的行中?我现在这样做o ESC p.这是唯一的方法吗?

Mar*_*off 8

以下是来自Vim帮助的答案:

:[line]pu[t] [x]        Put the text [from register x] after [line] (default
                        current line).  This always works |linewise|, thus
                        this command can be used to put a yanked block as new
                        lines.
                        The cursor is left on the first non-blank in the last
                        new line.
                        The register can also be '=' followed by an optional
                        expression.  The expression continues until the end of
                        the command.  You need to escape the '|' and '"'
                        characters to prevent them from terminating the
                        command.  Example: >
                                :put ='path' . \",/test\"
<                       If there is no expression after '=', Vim uses the
                        previous expression.  You can see it with ":dis =".

:[line]pu[t]! [x]       Put the text [from register x] before [line] (default
                        current line).
Run Code Online (Sandbox Code Playgroud)

但无论如何冒号进入是更多的击键= /


mic*_*ael 6

Theres o(cr)0,因为您可以在插入模式下始终从寄存器粘贴,但这仅限于您希望在粘贴后保持插入模式