View all entries in Miscellaneous

Lisp argument list in Vim

Did some puzzling and gluing of the code left behind by the SlimVim guys, and there's a basic argument list for Lisp forms displayed in the message area.

Terminal A:

$ sbcl
(require 'swank)
(swank-loader:init :load-contribs t) ; for A-F-E-A
(setf swank:*log-events* t) ; for extra debugging, not strictly required
(swank:create-server)

Terminal B:

$ cd ~/hacking/limp/vim-ecl/slime
$ ECL_SLIME_PATH=$(pwd) vim -c "source ecl-slime.vim"
" go to --debug-sv--
:bn
:5split foo.lisp
,sc
(+<Space>

It's kinda small. Can you spot it?

http://mikael.jansson.be/static/2009/01/arglist-for-echo-area.png

I had to update ARGLIST-FOR-ECHO-AREA: Swank now wants '(("foo")), where the old code assumed '("foo"), and because the ECL patch no longer includes the async part (occasionally caused corruption), communication with Swank is done synchronously. Support for multiple threads is there through the REX macro, though, so whenever network happens it'll be easy to add.


Responses

You can follow any responses to this entry through the RSS 2.0 feed.

  1. Larry Clapp said on January 6th, 2009 at 14:47 (link)

    Congratulations on getting this to work!

  2. Mikael Jansson said on January 6th, 2009 at 14:58 (link)

    Thanks, Larry!

    But I couldn’t have done it without the hard work you guys put into it. It’s still not optimal as I decided to remove the asynch patch, and I’m still trying to figure out how to add it again. Considering NetBeans, like PyClewn.

    The larger problem right now however, as I see it, is that you can’t really script Vim using foreign languages (e.g. no access to function arguments) which is a huge drawback.

    So I’m actually pondering whether it’d be a good idea to write an ncurses layer for McCLIM and add a custom Vim-style command table to Climacs. Much like what you’ve done to LW, I guess!

    But then again, it’s also about the challenge… :)

  3. LispNews (no. 4, Dec 25, 2008 — Jan 7, 2009) « Common Lisp Weekly News said on January 8th, 2009 at 10:27 (link)

    [...] Rob Warnok shows basic tips for Lisp development in Vim and Mikael Jansson explains how to get Lisp forms arguments in Vim. [...]

  4. Mikael Jansson » Blog Archive » Jag, en arg LCHF-människa? said on March 5th, 2009 at 19:15 (link)

    [...] Lisp argument list in Vim [...]

If this is the first time you comment on my site, your post might get held up in the moderation queue. Don't panic, I'll approve it as soon as possible!

Code (i.e. literal) blocks should be wrapped inside <PRE>.

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Close
Powered by ShareThis