What does HackerNews think of slimv?

Official mirror of Slimv versions released on vim.org

Language: Common Lisp

https://github.com/jpalardy/vim-slime is a terrible SLIME to be honest! Wait! It is not even a SLIME. It just copies text from one text buffer and pastes it to another Vim buffer which is probably running a REPL. "Probably" because who knows what the target buffer is running. vim-slime does not care. This is not Superior Lisp Interaction Mode for $EDITOR (SLIME) in any way.

vim-slime does not connect to any Swank server. It does not understanding Lisp s-expressions. It would happily copies any random text into any random REPL and call it job done! Lisp interaction mode is much much more than just copying and pasting text around. A superior lisp interaction mode gives you live debugging, handling conditions, inspecting variables, navigating the stack frames, ... Vim-slime cannot do anything like this because, well, it is not SLIME! It just copy-pastes stuff around. Vim-slime is a disingenious and misleading name for a project that is not SLIME.

If you really want to use Vim, do yourself a favor and use https://github.com/kovisoft/slimv and experience a true Lisp interaction mode. It contains an actual Swank server and an actual Swank client that connects to the Swank server to provide an actual Lisp interaction mode in Vim just like SLIME does in Emacs!

Join me vim brother and don't settle for forcing yourself to use emacs while developing in CL when you don't have to! You even have two vim options! https://github.com/kovisoft/slimv and https://github.com/vlime/vlime with a great comparison of the two: https://susam.net/blog/lisp-in-vim.html
SLIME is, but there is Slimv which is a SWANK client for vim:

https://github.com/kovisoft/slimv

(Never used it myself so can't comment on it beyond noting its existence.)

Slimv comes with a Paredit Mode: https://github.com/kovisoft/slimv Personally I leave it off, though, never been a fan of anything trying to 'help' me automatically while I'm typing apart from indentation. I do appreciate vim-sexp occasionally with these mappings: https://github.com/tpope/vim-sexp-mappings-for-regular-peopl...

https://susam.in/blog/lisp-in-vim-with-slimv-or-vlime/ is a good overview of the differences between slimv and vlime (the two vim plugins) and how to use them.

I'm using Vim with the SLIMV plugin (derived from SLIME for Emacs) and a bit of script glue to open a new Terminal tab for running SBCL with SWANK in. Like an IDE, and connected with a live Lisp.

https://github.com/kovisoft/slimv

From the OP:

  git clone https://github.com/kovisoft/slimv.git ~/.vim/bundle/slimv
  echo 'set runtimepath^=~/.vim/bundle/slimv' >> ~/.vimrc
  vim +'helptags ~/.vim/bundle/slimv/doc' +q
Is this a common way of installing Vim plugins?
> Lisp had this kind of interactive programming support for a long time using SLIME and Emacs.

For those like me who have Vim burnt into their fingers and brain, there is Slimv[1] for Vim. Another alternative is Vlime[2] for Vim. Both these plugins are based on the same client-server architecture that SLIME is based on. In fact, these plugins rely on Swank TCP server (the same thing that SLIME also relies on). Swank receives SLIME commands from Slimv or Vlime and executes them. Of these two Vim plugins, I prefer Slimv personally because apart from supporting Common Lisp, it supports MIT Scheme and Clojure too. Vlime supports Common Lisp only at this time.

[1]: https://github.com/kovisoft/slimv

[2]: https://github.com/l04m33/vlime

Often those who are curious to try Lisp are faced with a number of choices: Which dialect to choose? Which implementation to choose? Which book or tutorial should one follow? Is it necessary use Emacs? SLIME?

Here are my recommendations:

- Choose Common Lisp because it has been the most popular dialect of Lisp in the overall history of Lisp. It is more convenient than Scheme if one decides to develop serious software in Lisp. Clojure appears to be more popular in the technology industry than Common Lisp among organizations (my workplace included) that use Lisp. I still recommend Common Lisp because I believe that it is more likely that one would work on an independent open source or hobby Lisp project than one would encounter one of the rare organizations who use Clojure at work.

- Choose SBCL (Steel Bank Common Lisp) as the implementation.[1][2] It is the most popular Common Lisp implementation and is recommended in many online discussions. CCL (Clozure CL, not to be confused with Clojure which is a separate dialect) is also another very good implementation. I still recommend SBCL because as a result of its greater popularity, it is readily available via package managers such as brew and apt-get as well IDE packages such as Portacle, Lisp in a Box, etc. CCL is currently missing from both brew and apt-get.

- Work through this book: Practical Common Lisp: http://www.gigamonkeys.com/book/ (available in print too if you search online). Skip the sections about Emacs and SLIME if you don't use Emacs.

- There is no need to use Emacs if you are not an Emacs user. Any good editor would do.

- A Vim user may consider installing Slimv[3][4]. Superior Lisp Interaction Mode for Vim ("SLIME for Vim") or Slimv is similar to Emacs/SLIME, displays the REPL in a Vim buffer, and comes with Paredit mode that makes typing and executing Lisp code quite convenient.

- Emacs with SLIME or Vim with Slimv are quite useful but not necessary. To get started quickly without being bogged down by the details of an editor, just execute the Lisp source code file on shell.[5]

- Optionally, keep another implementation of Common Lisp. Common Lisp is a standard that is implemented by various implementations. Each implementation may have its own extensions or implementation-specific behaviour regarding error handling, command line options, FASL format, unspecified behaviour, etc. Experimenting with concepts with another implementation of Lisp occasionally may offer some perspective about how some things could be different in different implementations. I keep CLISP around for this purpose.[6][7][8]

[1]: Install SBCL on macOS: brew install sbcl

[2]: Install SBCL on Debian-based distro: apt-get install sbcl

[3]: Slimv in a ZIP file: https://www.vim.org/scripts/script.php?script_id=2531

[4]: Slimv as a Git repo: https://github.com/kovisoft/slimv/

[5]: Load (execute) code in a file and exit: sbcl --script foo.lisp

[6]: Install CLISP on macOS: brew install clisp

[7]: Install CLISP on Debian-based distro: apt-get install clisp

[8]: Unfortunately CLISP is missing from Debian's stretch (stable) repository but it is available in its buster (testing) and sid (unstable) repositories. Hopefully this will be addressed when buster becomes stable. CLISP is available on Ubuntu.

I think if you only want to see how wizards do it, you'll have to fully master emacs. As a non-wizard and vim-forever guy, who only occasionally writes Clojure for hobby projects, here's my advice.

For a long time I got by with creating a split-screen terminal with 'screen', and then used vim-slime (https://technotales.wordpress.com/2007/10/03/like-slime-for-...). It doesn't have to be split, I just like it that way, but the idea is you have essentially two views talking to the same screen session. In one you launch a repl (with lein, or even a ruby/python repl if you want) and on the other half you open vim and type things like ctrl+c etc. to send fragments from vim to the repl.

More recently I've been using slimv (https://kovisoft.bitbucket.io/tutorial.html and https://github.com/kovisoft/slimv -- and if you want my three vimrc prefs http://pastebin.com/VjwrEJJQ) after using it for Lisp, which uses swank, and found I could also do some of this for Clojure's repl (https://github.com/technomancy/swank-clojure). Unfortunately it's kind of outdated, that's not where the community is going (and I haven't really bothered to figure out exactly where that is, though that project's readme gives hints, nor have I really tried Fireplace recently enough to say if I still dislike it). But it works for me, for now, unless I want to use ClojureScript. I'd say give it a shot, you might like it.