> On 5/21/07, Yakov Lerner <[EMAIL PROTECTED]> wrote:
> > On 5/21/07, Antony Scriven <[EMAIL PROTECTED]> wrote:
> > > On 5/20/07, Yakov Lerner <[EMAIL PROTECTED]> wrote:
> > >
> > > > In a script, how do I get the value of ~ -- the
> > > > last used replace-to string, as used in s//~/ ?
> > > >
> > > > Yakov
> > > >
> > >
> > > Quick hack. --Antony
> > >
> > > fun! EchoTilde()
> > >    $ put=''
> > >    s/^/~/
> > >    let tilde = getline('.')
> > >    d
> > >    echo tilde
> > > endfun
> > >
> >
> > ~ can be multiline. Then d would not work correctly.
> > u would be better. but even then, buffer can be marked
> > nonmodifiable.

Then create a new buffer. It's a quick hack; take the idea,
then /you/ make it work. Or don't, find a better solution.
It's your call. --Antony

Reply via email to