Austin Wagner
Austin Wagner

Reputation: 1081

Put on new line while maintaning indentation in Vim?

Both oEscp and :lineput cause the text to be pasted at the beginning of the line. I want a way to paste text as if I hit o and just started typing.

Upvotes: 2

Views: 101

Answers (2)

romainl
romainl

Reputation: 196496

Use <C-r>" to put from the unnamed register or <C-r>a to put from register a.

See :help i_ctrl-r.

Upvotes: 2

ryuichiro
ryuichiro

Reputation: 3865

Try CTRL-R 0 (zero).

Why it is good explains this nice video here.

More about it you can find in Vim

:h i_ctrl-r

Upvotes: 2

Related Questions