Monday, November 9, 2015

Re: override record

On 2015-11-09 11:15, shawn wilson wrote:
> I'd like to make record/'q<letter> put the let @<letter>=stuff in my
> command buffer to make doing minor edits easier - is there an easy
> way to override the default functionality and keep let it do the
> rest of what it does?

Because the content is just recorded to a register, you can either

1) paste the register into a new buffer, edit, and re-yank back into a
register (either the same or another one)

2) assign to it with the desired changes:

:let @a=substitute(@a, 'foo', 'bar', 'g')

There might be other plugins that make this easier, but either of
those should work in most builds of vim.

-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

---
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 vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: