On Mon, Feb 11, 2013 at 10:44 AM, tooth pik <[email protected]> wrote:
> On Mon, Feb 11, 2013 at 10:35:56AM -0500, shawn wilson wrote:
> > Is there any way to edit a register?
>
> > Sometimes I copy something with a return in it into "+ or I realize I
> > put too much/little into a macro and would be nice to go and tweak it.
> > :reg just lets me see things but not edit. Any ideas?
>
> the most common way I think is to paste the contents of the register
> into a buffer, edit it there, then yank it back in -- the easiest way
> to paste a register into a buffer is with i_CTRL-R then the letter of
> the register
>
> see :h i_CTRL-R
>
> sc
I prefer to use Normal mode, but of course vim is flexible by design
(:h design-flexible) so use whichever you prefer. Using the + register as
an example,
"+p
<edit>
"+y<motion>
You can also make small changes from the command line:
:let @+ = @+ . "\<CR>"
I occasionally copy the file name to the system register with
:let @+ = @%
:help p
:help y
:help let-register
HTH
--
Benji Fisher
--
--
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
---
You received this message because you are subscribed to the Google Groups
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.