On Wed, 12 Jul 2006 14:15:39, Andre Bar'yudin wrote:
>
> Who would think it was possible...
>
> On 7/12/06, Erez D <[EMAIL PROTECTED]> wrote:
> > if anyone is interested, here is the solution:
> >
> > :%s/\([0-9]*\)+\([0-9]*\)/\=submatch(1)+submatch(2)/g
> >
> > > 8+9 to 20
> > > 1+7 to 29
> > >
> > > and i want to change it to:
> > >
> > > 17 to 20
> > > 8 to 29
> > >
> > > (i.e. do the math)

I don't want to start a religious war, BUT, ....
May be it is a formidable task for VI. In Emacs I have a package
(written purely in lisp of course) that computes a full algebraic
sentence and have some simple functions (abs, log/exp, trigonometric)
included in it. You can mark an algebraic expression and evaluate it.

e.g. @sqrt(1+(1+3)*2) ==> 3
     a=3        ==> 3 (+message a set to 3)
     a-a**2/2   ==> -1.500000 ((+messages:  a was 3    a was 3)

There is one drawback - you must not use names with `-' (hyphen),
otherwise the `-' is taken to be minus.

The algebraic package is here: http://t-e-k.biz/els/compute.el
The marks package is here: http://t-e-k.biz/els/ekmarks.el

Ehud.


--
 Ehud Karni           Tel: +972-3-7966-561  /"\
 Mivtach - Simon      Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D <http://www.keyserver.net/>    Better Safe Than Sorry

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

  • Re: vi q Ehud Karni

Reply via email to