Re: JSVI: Vi implemented in Javascript

2007-05-30 Thread Antony Scriven

On 5/30/07, François Pinard <[EMAIL PROTECTED]> wrote:

> [Tobias Klausmann]
> >On Wed, 30 May 2007, A.J.Mechelynck wrote:
>
> > >  Hmm... when's the day when Vim will be implemented in Lisp [...]
>
> >Of course, that has already been done. It's called viper:
> >http://www.delorie.com/gnu/docs/emacs/viper.html
> >Viper Is a Package for Emacs Rebels.
>
> It's quite far from "Vim".  Only "vi", that is, almost unusable :-).

Unfortunately it doesn't emulate vi properly either. --Antony


Re: How to get value of ~ (last used replace-to string) in script

2007-05-21 Thread Antony Scriven

> 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


Re: How to get value of ~ (last used replace-to string) in script

2007-05-20 Thread Antony Scriven

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