Esiste un equivalente di o- < esc > ;-p in Vim?
-
10-07-2019 - |
Domanda
Quando tiro una riga intera e premo p , Vim crea una nuova riga per inserire il testo strappato, a causa dei caratteri di nuova riga. Ma se tiro una parte di una riga c'è un modo per inserire quel testo strappato in una nuova riga? Attualmente faccio o ESC p . È l'unico modo?
Soluzione
Ecco la tua risposta dall'aiuto di 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).
Ma i due punti-p-u-enter sono comunque più tasti = /
Altri suggerimenti
Theres o (c-r) 0 come puoi sempre incollare dai registri mentre sei in modalità inserimento ma questo è solo se vuoi rimanere in modalità inserimento dopo l'incolla
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow