vim-redl icon indicating copy to clipboard operation
vim-redl copied to clipboard

Add ability to eval for under cursor in the redl

Open qiuwei opened this issue 11 years ago • 4 comments

How can I evaluate a form under cursor in the debug repl?

It seems :Replhere would create a debug repl automatically. But how can I send forms to it like "cpp" in vim-fireplace?

Thanks!

qiuwei avatar Jun 05 '13 15:06 qiuwei

I'm a very new user, but as far as I've seen, it's not possible. You either use vim-fireplace's "cpp" to execute in the code's buffer, or you copy your code (with "yab" for example, to copy the current block), change buffer, paste it in the REPL, and execute.

But I agree that it would be a nice feature. I have no idea what it involves in terms of implementation, though.

mascip avatar Jul 31 '14 21:07 mascip

I have changed the target of this issue. There's 2 ways that this could be done: either we could make Redl first-class nrepl middleware, in which case cpp would directly connect to it, or we could add a new command, like "crp", that would send the form under the cursor to the redl. The tricky part here is choosing which redl to send it to--I don't think that's a simple problem, since I think it's very hard to determine which ones are currently opened.

dgrnbrg avatar Aug 01 '14 20:08 dgrnbrg

The first solution sounds very good, but how much work does it represent for you? Would there be other benefits from this approach?

mascip avatar Aug 02 '14 13:08 mascip

The first solution would require me to learn how nrepl works--last I looked, it seemed pretty confusing & specific to emacs. Perhaps the docs are better now.

dgrnbrg avatar Aug 02 '14 16:08 dgrnbrg