cursive

genekim 2025-01-31T19:26:59.034239Z

@tony.kay This sounds a bit obscure, but I just realized something yesterday. I love the idea of “Send form before caret to REPL,” but I feel like I’d use it all the time if I could just get it to work — and then I realized, the IntelliJ vim plugin never puts the cursor where it needs to be. It puts the cursor ON THE LAST CHARACTER, not AFTER THE LAST CHARACTER. So “Send form before caret to REPL” never works for me. Tony, I thought I’ve seen you use this successfully. Was I imagining this? If not, I’m wondering if I could configure vim or Cursive to enable this to work for me. Okay, that might have been confusing. Here’s a 2.5m video demonstrating this. TY!!! https://capture.dropbox.com/1KHfaODpSTxjeEnV

serioga 2025-02-06T12:36:47.601939Z

That's why I use only “Send Top Form to REPL.” It works with selection as well.

💯 1
genekim 2025-01-31T19:29:09.510979Z

PS: @cfleming in vim, “$” puts cursor at end of line — or rather, it puts cursor on last character in the line. To my knowledge, there’s no way to putting the character AFTER the last character! 😆

tony.kay 2025-01-31T19:38:18.088579Z

There is no character after the last one, so you cannot move there in edit mode, but A puts you there and starts appending (Append to end of line)…which has the effect

2025-01-31T23:01:46.386699Z

I'm interested in using a REPL command to do the following: • Read the ~selected-form • Run some transformation code defined in the REPL command itself to produce a transformed version of ~selected-form • Replace the selected text with the result of the REPL command using Replace original form with result However, it looks like Replace original form with result is only available for evaluating a form in my project code and replacing that form with its result (rather than evaluating code defined in the REPL command). Is it possible to allow Replace original form^H^H^H^H^H^H^H^H^H^H selected text with result in other contexts?

Bob B 2025-02-01T16:14:55.232539Z

I'm not sure if this is perfectly what you're after, but inserting the result into the editor seems to have the net effect of replacing the selected form (by virtue of the inserted text replacing the selection)

👀 1
2025-02-01T16:18:20.969339Z

Yes indeed! Why didn't I think of that?

cfleming 2025-02-01T23:12:35.081479Z

Nice workaround! But replacing the selection does seem generally useful, and could be used for things other than Clojure too.