¿Hay un equivalente a o- < esc > ;-p en Vim?
-
10-07-2019 - |
Pregunta
Cuando tiro una línea completa y presiono p , Vim crea una nueva línea para colocar el texto arrancado, debido a los caracteres de nueva línea. Pero si tiro una parte de una línea, ¿hay alguna forma de poner ese texto arrancado en una nueva línea? Actualmente hago o ESC p . ¿Es esta la única forma?
Solución
Aquí está tu respuesta de la ayuda de 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).
Pero colon-p-u-enter es más pulsaciones de teclas de todos modos = /
Otros consejos
Hay o (c-r) 0, ya que siempre puedes pegar desde registros mientras estás en modo de inserción, pero eso solo si quieres permanecer en modo de inserción después de pegar
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow