On Sat 3-Jun-06 9:50pm -0600, stri ker wrote:
> My question is this:
> Is there a way to do calculations with doubles instead of integers
> without piping to an external program like bc and then inserting into
> a buffer?
> For example
>
> :r!echo '491.41 - 29.74' | bc
>
> works when putting the result into the buffer.
As someone mentioned, Python comes with excellent math
support. All you need to do is install Python, make a few
obvious changes to the make file and you'll have a Python
enabled Vim.
Once you get tired of typing:
:py print 12.0/7
you can define:
:com! -nargs=* PC py print <args>
and now type:
:PC 12.0/7, 9 ** 20
--
Best regards,
Bill