行全体をヤンクして を押すpと、改行文字のために、Vim はヤンクされたテキストを配置するために新しい行を作成します。しかし、行の一部をヤンクした場合、そのヤンクしたテキストを新しい行に入れる方法はありますか? 私は現在行っていますo ESC p。これが唯一の方法ですか?
2 に答える
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).
しかし、とにかくコロン-プ-エンターはより多くのキーストロークです=/
于 2009-06-23T23:27:42.700 に答える
6
挿入モードではいつでもレジスタから貼り付けることができるのでo(cr)0がありますが、これは貼り付け後に挿入モードを維持したい場合に限ります。
于 2009-06-23T23:47:06.767 に答える