Using Vim for Lisp development

47,235

Solution 1

Limp aims to be a fully featured Common Lisp IDE for Vim. It defaults to SBCL, but can be changed to support most other implementations by replacing "sbcl" for your favourite lisp, in the file /usr/local/limp/latest/bin/lisp.sh

When discussing Lisp these days, it is commonly assumed to be Common Lisp, the language standardized by ANSI X3J13 (see the HyperSpec, and Practical Common Lisp for a good textbook) with implementations such as GNU Clisp, SBCL, CMUCL, AllegroCL, and many others.

Back to Limp. There are other solutions that are more light-weight, or try to do other things, but I believe in providing an environment that gives you things like bracket matching, highlighting, documentation lookup, i.e. making it a turn-key solution as much as possible.

In the Limp repository you'll find some of the previous work of the SlimVim project, namely the ECL (Embeddable Common Lisp) interface, merged with later releases (7.1); Simon has also made patches to 7.2 available yet to be merged. The ECL interface is documented in if_ecl.txt.

Short-term work is to do said merging with 7.2 and submit a patch to vim_dev to get it merged into the official Vim tree.

Which leads us to the long-term plans: having Lisp directly in Vim will make it convenient to start working on a SWANK front-end (the part of SLIME that runs in your Lisp, with slime.el being the part that runs in the editor - the frontend).

And somewhere in between, it is likely that all of Limp will be rewritten in Common Lisp using the ECL interface, making Limp easier to maintain (VimScript isn't my favourite) and being easier for users to customize.

The official Limp site goes down from time to time, but as pointed out, the download at Vim.org should always work, and the support groups limp-devel and limp-user are hosted with Google Groups. Don't hesitate to join if you feel you need a question answered, or perhaps even want to join in on development. Most of the discussion takes place on the limp-devel list. If you're into IRC, I'm in #limp on irc.freenode.net as 'tic'.

Good luck!

Solution 2

You might give slimv a break.

Solution 3

Here's a cool diagram by Xach that sums up the current situation.

diagram explaining that there are nearly no VIM users that are also Lisp programmers and can also hack it to make it a good Lisp IDE... lousy alt text :)

Solution 4

Here we are 9 years later, and now we have Vim 8 and Neovim, both providing the ability to interact with plugins asynchronously.

vlime is an excellent, feature-rich plugin that takes advantage of the new async interface to provide a SLIME-like dev environment for Common Lisp.

Solution 5

SLIME for EMACS is a wonderful tool for LISP programming. The best part is sending code written in your editor straight to a live LISP session. You can get similar behavior out of Vim using the tips here:

http://technotales.wordpress.com/2007/10/03/like-slime-for-vim/

I adjusted my own script so that I can send to either a SBCL or Clojure session. It makes you much more productive and takes advantage of the REPL.

":set lisp" starts the lisp indentation mode for Vim. But it won't work with some dialects like Clojure. For Clojure, use VimClojure.

Some people like LIMP also.

Share:
47,235
Drew Olson
Author by

Drew Olson

software is fun @drewolson

Updated on December 27, 2020

Comments

  • Drew Olson
    Drew Olson over 3 years

    I've been using Lisp on and off for a while but I'm starting to get more serious about doing some "real" work in Lisp. I'm a huge Vim fan and was wondering how I can be most productive using Vim as my editor for Lisp development. Plugins, work flow suggestions, etc. are all welcome.

    Please don't say "use emacs" as I've already ramped up on Vim and I'm really enjoying it as an editor.

  • Luís Oliveira
    Luís Oliveira over 15 years
    indenting is easy. Providing a good IDE is much more important. Actually VIM won't even do that (indentation) as well as Emacs/SLIME does.
  • Sam Stokes
    Sam Stokes over 15 years
    That's silly. You don't need C to customise Vim. Vim is scriptable out of the box in its own language, and most builds support Ruby and Python scripting as well.
  • Will Hartung
    Will Hartung over 15 years
    So, the VIM users that want to use VIM for Common Lisp are the core of all VIM users?? Maybe I'm missing something here...
  • Erik Garrison
    Erik Garrison almost 14 years
    What is the status of this work? Are you still interested in doing work with it?
  • intuited
    intuited over 13 years
    @Luis: Actually, the fact that the blue dot is in the center makes it impossible for the green one to not intersect with it. I would say that the author of the diagram is missing how geometry works.
  • Luís Oliveira
    Luís Oliveira over 13 years
    Green and blue are supposed to intersect.
  • Kirk Strauser
    Kirk Strauser about 13 years
    I still stand by this answer, even though people are still voting it down as of April 2011. I like Vim and use it daily, but there's nothing like programming Lisp in an environment written in Lisp. "I wish I could make my editor react to what's happen in my Lisp server. Oh, wait! I can!" is a great feeling. Again: I like Vim, but my opinion is that Emacs is a much better editor for working with Lisp.
  • jpswain
    jpswain almost 13 years
    I'm confused. The "answer" seems like a suggestion of a few options, such as using Limp, but doesn't explain at all how to accomplish this. I thought the question was, how do I use Vim with SBCL/whatever. This does not really answer the question, so I'm a bit confused by all the upvotes. Would you mind going into a little detail on how to actually set up this environment and get started?
  • jmsu
    jmsu over 12 years
    +1 Just starting with slimv so almost no knowledge about it but it seems to work perfectly fine out of the box as a real alternative to slime for emacs. Also it has recent releases (v0.9.2 07-nov-2011) while limp has no updates since 2008.
  • tempire
    tempire over 11 years
    Been using slimv for a while; it's excellent. Nothing else compares in the space.
  • kynan
    kynan over 10 years
    It seems Limp is no longer maintained: the site is down and the last change was in 2008.
  • George Hawkins
    George Hawkins over 9 years
    As noted by others most of the links above (and on the limp page on vim.org) are long broken. However you can find nearly everything (the .vim files and the related documentation) at github.com/mikaelj/limp
  • Kirk Strauser
    Kirk Strauser over 6 years
    Followup: 6 years later and y'all are still voting on this nearly-decade-old answer? OK, we get it, we get it! 😀 I'm still not changing it.
  • KWC
    KWC almost 3 years
    I think slimv is ok and in fact it makes me work lisp code so much better without emacs in the way. vi is used for decades as it is default for unix/linux/ICL environment.