Existe um equivalente para o- -p no vim?
-
10-07-2019 - |
Pergunta
Quando eu puxar uma linha inteira e pressione p , Vim cria uma nova linha para colocar o texto arrancou, por causa dos caracteres de nova linha. Mas se eu arrancar parte de uma linha existe uma maneira de colocar esse texto arrancou em uma nova linha? Eu atualmente fazer o ESC p . É este o único caminho?
Solução
Aqui está a sua resposta a partir Vim ajuda:
:[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).
Mas cólon-p-u-entrar é mais combinações de teclas de qualquer maneira = /
Outras dicas
Há o (c-r) 0 como você sempre pode colar a partir de registos, enquanto o seu no modo de inserção, mas isso é somente se você quiser permanecer no modo de inserção após a pasta ??p>
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow