This is a read-only archive of lispforum.com. The forum was locked to new users and posts and is preserved here as static HTML from a database snapshot taken on 2019-09-07.

Limp, a Lisp mode for vim

12 posts · 30579 views

Hi,

This forum needs some content, so I want to mention that I have been using Limp (http://mikael.jansson.be/hacking/limp/docs/), a lisp mode for vim, for about one month. It is a new software with some bugs, but basically it works well, and I think it is the best solution for those that don't like Emacs. I tried Viper mode on Emacs, but you lose your .vimrc settings, and it is not the same.

Re: Limp, a Lisp mode for vim

I'm glad to see Limp exist. I'm very much an Emacs user, but it has seemed for too long that the only way to program Lisp in a sensible manner was to use Emacs (with or without SLIME). I'm glad to see vi users getting better tools.
Cheers, Dave
Slowly but surely the world is finding Lisp. http://www.findinglisp.com/blog/

Re: Limp, a Lisp mode for vim

It works ok, but i didn't find in documentation how to adjust colors or how to switch off automatic closing brace insert. In gvim, when form is highlited after \ec, it becomes unreadable in almost every color scheme. Had no time dig in the source for answers yet.

Re: Limp, a Lisp mode for vim

dmgenp wrote:It works ok, but i didn't find in documentation how to adjust colors or how to switch off automatic closing brace insert. In gvim, when form is highlited after \ec, it becomes unreadable in almost every color scheme. Had no time dig in the source for answers yet.
The reason for these things not being tunable is becasue I've yet to hear from a user that wants that level of configuration. Basically, I've just packaged what I like -- I am, however, open to suggestions, and I would very much like to hear about suggestions, questions or comments, at [email protected] (http://groups.google.com/group/limp-user).

If you already know what's bugging you, feel free to open a new ticket at http://mikael.jansson.be/hacking/limp/newticket and I'll have a look at it!

Thanks!
--
Mikael Jansson
http://mikael.jansson.be

Re: Limp, a Lisp mode for vim

dmgenp wrote:It works ok, but i didn't find in documentation how to adjust colors or how to switch off automatic closing brace insert. In gvim, when form is highlited after \ec, it becomes unreadable in almost every color scheme. Had no time dig in the source for answers yet.
I have specified the color scheme in my .vimrc and edited the color commands manually to make it look ok (in mode.vim), but I agree that it should be easier to configure than editing the source code. If nothing else, it means that I have to do it over and over again every time a new version is released. This are my current settings for gvim using the default color scheme:
    hi Brackets      ctermbg=53 ctermfg=white 
    hi BracketsBlock ctermbg=235 guibg=lightgray
    hi StatusLine    ctermbg=white ctermfg=160
    hi StatusLineNC  ctermbg=black ctermfg=gray
    hi Pmenu         ctermbg=53 ctermfg=255
    hi PmenuSel      ctermbg=255 ctermfg=53

Re: Limp, a Lisp mode for vim

yena wrote:This are my current settings for gvim using the default color scheme:
Thanks, i'll try this next time i get my hands on lisp hacking. Sadly, i don't have much time for lisp lately :(

Re: Limp, a Lisp mode for vim

Hello,

Is there a way to keep both windows with Lisp and Vim
opened? A realtime view of the output would be great.

BTW, thanks for Limp!

Re: Limp, a Lisp mode for vim

istirbu wrote: Is there a way to keep both windows with Lisp and Vim
opened? A realtime view of the output would be great.
I' ve done that by manually starting lisp in a terminal:
start:
$LIMPRUNTIME/bin/lisp.sh test -b
connect to it in the running terminal:
$LIMPRUNTIME/bin/lisp.sh test

and then connect from gvim:
press F12, press tab on the prompt
Connect to [boot new]:
your newly created lisp instance name willl be displayed. press enter, and you will have an independent window with running lisp. Pressing F12 will open another window with the same lisp instance.

Re: Limp, a Lisp mode for vim

istirbu wrote:Is there a way to keep both windows with Lisp and Vim
opened? A realtime view of the output would be great.
Yes. Boot a Lisp (by pressing F12, enter and then give it a name). In the status line, you'll see in parens the name and number of the Lisp process. Then, in another terminal,

$ /usr/local/limp/latest/bin/lisp.sh <number-corresponding-to-the-lisp>

You can also give the name, if you don't have >1 Lisps with the same name.
istirbu wrote:BTW, thanks for Limp!
Thank you. I'm glad you like it. If you find any bugs or issues, file a ticket at http://mikael.jansson.be/hacking/limp/newticket, so I can further improve on Limp!

Also, please consider using the official support forums at http://groups.google.com/group/limp-user -- it makes it much easier for me to track discussions, by keeping them all in a single place.
You can either use the Google Groups web interface, or, if you prefer an e-mail version, [email protected] (subscribe first by sending an e-mail to [email protected]).

Thanks!
--
Mikael Jansson
http://mikael.jansson.be

Re: Limp, a Lisp mode for vim

I thought I'd post some context about how I use Limp. I'm very glad to see it exist — I never got previous vim plugins to work properly.

Firstly, I already had great syntax coloring (I use ps_color), and I couldn't quite fix Limp's bracket highlight to not annoy me, so I just stripped the whole thing out (including deleting highlight.vim).

Secondly, I switched F12 to F1. F12 collides with Mac system keys, y'see, and there seems to be a bug in Limp that causes it to enter the disconnected state every time I (re)open a file, so I find myself hitting that key a lot!

Thirdly, I use ACL rather than SBCL, so I hacked up lisp.sh to pass the correct image arguments, not ask for a version, etc.

When I start up, I actually open a separate Terminal and attach screen there. (Limp starts X11 and xterm, which is not as Mac-friendly... but because it just uses screen, I can kill the xterm without fear!)

With those changes, the only things that get on my nerves are:

* The reloading-limp bug, which was supposed to be fixed but still shows up for me
* The disconnecting-on-edit bug
* That *somehow* Limp has changed indenting in Lisp files. My previous indent system wasn't perfect — custom indents for macros are hard-coded — but Limp seems to do the wrong thing for me all the time:
(if (thing)
    (cond
     (one 1)
     (two 2))
    (two))
rather than
(if (thing)
  (cond
    (one 1)
    (two 2))
  (two))
for example. I still haven't found where this is getting set (probably in the bracket completion stuff)... ah well. Fixing that is a low priority.

Thanks for your hard work, Mikael!

Re: Limp, a Lisp mode for vim

holygoat wrote:* That *somehow* Limp has changed indenting in Lisp files. My previous indent system wasn't perfect — custom indents for macros are hard-coded — but Limp seems to do the wrong thing for me all the time:
Yeah, the indentation thing is really annoying, but there is already a bug report filed on that. Hope it will be fixed soon; if I was any good at vim scripting i'd try myself. Otherwise it works fine enough for my purposes.

Re: Limp, a Lisp mode for vim

Thanks! And yes, I've been seeing those issues, too.

However, I really cannot follow up on any of these things unless you file them as tickets on the project page. It's harsh, but that's the way it has to be.

That said, I'm looking into replacing many things in Limp that's written in Vim-script with Lisp-native equivalents using the ECL-enabled version of Vim, which should make it easier to customize things like color scheme and such -- I don't feel quite comfortable with Vim-script.