5 ms·
How do you use SLIME in Vim? Isn't SLIME written in Emacs Lisp which runs only in Emacs? Honest question how you could run an Emacs package in Vim?
by ctrlmeta 4y ago
How do you use SLIME in Vim? Isn't SLIME written in Emacs Lisp which runs only in Emacs? Honest question how you could run an Emacs package in Vim?
- hiptobecubic 4y agoYou don't. You run it in emacs. That's what they are saying.
- Jtsummers 4y agoSLIME is, but there is Slimv which is a SWANK client for vim: https://github.com/kovisoft/slimv https://github.com/kovisoft/slimv (Never used it myself so can't comment on it beyond noting its existence.)
- aidenn0 4y agoI have an article I wrote about how I did this, but may have lost it to time. The short version is I have SLIME running inside Emacs, and my text files open in vim. I would just reload the changed file(s) when needed (originally with cl:load-file, then later with asdf, which is roughly "make" for lisp). I used slime similarly to how I would use gdb. It was a big improvement over using vim with the clisp[1] REPL both because SLIME was more powerful than the clisp repl, and because it worked with other implementations like CMU CL (which sbcl now is a fork of). I mostly just used the menus for interacting with emacs, but since the shortcuts are listed beside commands, I did learn the more commonly used ones. I continued like this for years until I discoveredevil-mode[2], which was the first thing close enough to vim to be usable for me (and even then I had to add a few keybindings that it was missing). 1: clisp is a specific implementation of common lisp, not an abbreviation 2: https://github.com/emacs-evil/evil https://github.com/emacs-evil/evil
- Jach 4y agoTo provide a bit more context, most of SLIME is just Common Lisp code (https://github.com/slime/slime https://github.com/slime/slime), with a bunch of Emacs Lisp code alongside to support interfacing with Emacs. But you don't need that Emacs Lisp code to take advantage of almost all of the functionality SLIME provides. For instance, if you want to know who-calls a function, there's some command in emacs to do it, but all that command is doing is just a bit of elisp code which sends a message to Swank (a server running inside Common Lisp) and Swank invokes some native CL code to figure that out and return the results, then finally a bit of elisp code presents the results in some way. Vim can do the same thing just fine with vimscript/python (what the Slimv plugin uses) or otherwise, the bulk of the work in figuring out the list of callers of some function is done by the CL code (and CL implementation itself).
- 3836293648 4y agoWith this: https://github.com/jpalardy/vim-slime https://github.com/jpalardy/vim-slime It doesn't do everything, it doesn't do it as elegantly, but it works
- ctrlmeta 4y agoThis does not look like SLIME. It seems to be just copying the text from one text buffer and pasting it to another Vim buffer which is running a REPL. That is not what SLIME is really! I can't even call this a poor imitation of SLIME because it is not SLIME in any sense of what SLIME is. There is no Swank server this connects to. There is no understanding of Lisp's s-expressions. It would happily copy any random text into any random REPL and call it job done! It is weird that they have chosen the name "SLIME" for vim-slime project when it is not SLIME in any way.