tl;dr: I'm looking for a built-in normal mode command that combines the :pu[t]
and ]p
commands. (Maybe the new command would be :]pu[t]
?)
Is your feature request about something that is currently impossible or hard to do? Please describe the problem.
Vim already provides several built-in normal mode commands for putting text from a register above or below the cursor without leaving normal mode. The key ones in this context are p
, P
, ]p
and ]P
. The versions with ]
automatically indent the copied text.
However, those commands put the textin the same manner that it was yanked. So, if you yank charwise, then the text is put charwise. Possibly to help out with this, Vim also provides :pu[t][!]
. This command puts text linewise no matter how it was yanked. Unfortunately, that command does not adjust the indentation of the text. There is no equivalent of ]p
and ]P
that also unconditionally puts text linewise.
Looking at the flags for do_put
, I think that this should be relatively easy to add such a command to Vim (famous last words?), but I cannot follow the C code well enough to try it myself.
Describe the solution you'd like
I would like a built-in normal mode command that unconditionally puts text from a register linewise and adjusts to the indent of the current line.
Describe alternatives you've considered
Currently, you can get this in Vim by using vim-unimpaired. I understand that the request isn't urgent, but as I said all the pieces seem to be in place to make adding this relatively simple. Thanks for considering it.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
Closed #16225 as completed via 250739d.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
Reopened #16225.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
Closed #16225 as completed via e08f10a.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.