1

I'm wondering if I can make a Vim plugin that sends forms over to the REPL session that lein repl starts. Is there a way to send messages to an existing jline.ConsoleRunner process?

dan
  • 43,914
  • 47
  • 153
  • 254

3 Answers3

5

Slightly OT, but this is what nrepl is for. IIUC, vimclojure uses nrepl now for the REPLs it starts, and allows you to connect to remote Clojure processes that have started an nrepl server. I don't think Leiningen has an nrepl plugin, though (yet).

cemerick
  • 5,916
  • 5
  • 30
  • 51
  • Exactly what I wanted. Thanks. – dan Feb 24 '11 at 20:58
  • AFAIK lein repl starts standard clojure REPL, which supports nrepl if I remember correctly since Clojure 1.3. Also, vimclojure does not start REPL by itself, it is programmer's duty - because of vim internal limitations on I/O. – Vladimir Matveev Aug 23 '12 at 06:13
1

https://github.com/sattvik/lein-tarsier does more or less that ... I don't know if it's using nrepl or not, but with lein-tarsier you can have vimclojure talk via nailgun to a JVM which is also running a REPL. HTH

Blake Miller
  • 805
  • 11
  • 16
1

You may find the slimv vim plugin helpful.

see this SO question Sending input to a screen window from vim

A general approach is to start a screen session run lein repl, then sent the vim output to the screen session.

Community
  • 1
  • 1
Arthur Ulfeldt
  • 90,827
  • 27
  • 201
  • 284
  • Thanks. I use Tmux, though, and I was hoping there was a more direct way to talk to the repl process. – dan Feb 24 '11 at 19:28