[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [vile] searching for register contents
From: |
Brendan O'Dea |
Subject: |
Re: [vile] searching for register contents |
Date: |
Fri, 28 Jun 2013 12:55:48 +1000 |
On 28 June 2013 10:40, Thomas Dickey <address@hidden> wrote:
> On Thu, Jun 27, 2013 at 03:47:57PM -0400, Wayne Cuddy wrote:
>> If I yank a word (or words) into a register is there a way to search
>> the current buffer for that registers contents?
>
> hmm. That puts the content into the unnamed buffer as well as kill-buffer-1.
> The $kill variable gets part of that (I recall as the first chunk, which
> should be enough for word/words), so you could assign that to $search,
> and use it - provided there are no metacharacters.
An option would be to permit a register prefix to ^X-/ search, in
which case the search pattern would come from the register rather than
the screen. Lightly tested implementation appended. Example use:
"zy2e
to yank two words to register z, then
"z^X/
to search for those two words.
--bod
vile.patch
Description: Binary data