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. Yakov