Monday, June 27, 2011

Re: newbie put question

On 06/27/2011 04:11 PM, russurquhart1@verizon.net wrote:
> I know that when i yank LINES, the put command (p or P) will
> put those lines before or after the line the cursor is on.
> When i select something less than a line, it puts it before or
> after the current position. My question, is there a way to
> select several LINES and put those before or after the current
> cursor position, NOT before or after the current line?

While there may be other ways, the first that comes to my mind is
to go into insert-mode (using "i" or "a" to position the cursor
where you want it) and then paste the register-contents using
control-R followed by the register-name (use the double-quote to
use the default/scratch register).

:help i_CTRL-R

You may also want to read the following bits about CTRL-R
submodes (":help i_CTRL-R_CTRL-R", ":help i_CTRL-R_CTRL-O", and
":help i_CTRL-R_CTRL-P") regarding how indentation behaves.

-tim


--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment