[slimpl] vim+ecl documentation

Eirik A. Nygaard eirikald at pvv.ntnu.no
Sat Mar 11 05:24:02 CST 2006


On Fri, Mar 10, 2006 at 01:27:53PM -0500, Larry Clapp wrote:
> On Fri, Mar 10, 2006 at 01:57:50PM +0100, Eirik A. Nygaard wrote:
> > On Fri, Mar 10, 2006 at 10:58:12AM +0000, Jim Bailey wrote:
> > > I have pulled your changes, and will check for updates regularly.
> > > It would be nice to maintain a list of repositories as my one is
> > > likely to fall behind soon as I will be travelling for a few
> > > months and internet access might be a problem. Maybe this could be
> > > added to the wiki?
> > 
> > Having a wiki page showing all the repos and a little descrption of
> > them would be a nice idea.
> > 
> > I have made a quick page, linked from Perl_interface_to_SLIME. Can
> > be found here: http://wiki.alu.org/Slim-Vim-Repos
> 
> Cool, thanks.  I glanced at your help file; it looks pretty good so
> far.  One nitpick: instead if ecl.txt, you should name your file
> if_ecl.txt.
Good idea, will fix that.

> 
> One non-nitpick: you said
> 
>   (expr string)		Evaluates string as a lisp expression,
> 	                returning the result as a string.
> 
> EXPR evaluates the string as a VIM expression.  :)  E.g.,
> 
>   :ecl (print (vim:expr "&cpoptions"))
>   "aABceFs"
>   :let my_variable = "foo"
>   :ecl (print (vim:expr "my_variable"))
>   "foo"
>   :let b:my_buffer_variable = "bar"
>   :ecl (print (vim:expr "b:my_buffer_variable"))
>   "bar"
>   :ecl (print (vim:expr "1+2"))
>   "3"

Oh, missed that one. It was somewhat of a last minute add-in. Will fix it as
soon as I can. Documenting random pieces off code without checking them properly
is no good.

> 
> vim:expr can also call functions and so on.
> 
> Note to others: I, for one, would prefer NOT to see vim:expr and
> vim:command scattered all over the place, so I would recommend (and
> request) that we use vim:expr and vim:command strictly as "ffi" around
> which we wrap Lisp functions or symbol-macros as appropriate.
> Something like 
> 
>   (vim:defvar cpoptions)
>   
> would define CPOPTIONS as a symbol-macro that expands to 
> 
>   (vim:expr "&cpoptions") 
>   
> and also defines a SETF form such that 
> 
>   (setf cpoptions "val") 
>   
> expands to
> 
>   (vim:command "let &cpoptions = \"val\"")

Agreed.

> 
> Once we get a "Vim FFI" going, we can either include it directly in
> the repository, post it on the wiki, or at Vim.org.
> 
> Hehe ... "post it at Vim.org" ... that'd be a hoot.  "Oh, by the way,
> this requires the ECL patch, available at <url>."  That'd be one way
> to build legitimacy (or at least visibility) in the Vim community!  :)

I would like some more testing of the interface before we post anything.
Try to get rid of those "random" boo-boos. And have a more full-packed
documentation. Those should probably be better when the FFI is done though.

We are really starting to have something to show off now, that is nice.

Let us start having a vim+ecl-script added to the vim repo we have now, then we
can work on it for a bit and get some testing before we go public-public.

-- 
Eirik Nygaard


More information about the slimpl mailing list