Fork me on GitHub
#conjure
<
2020-05-05
>
rgm00:05:02

dang, is eval at mark ever useful … I set up little test forms in (comment ,,,) and can just eval fn eval test eval fn eval test so quickly.

metal 8
Olical09:05:47

It's pretty niche but when it's the tool you need it's the perfect tool

Olical10:05:27

I find when I have a test callsite and like four functions involved it works great. I hop between working on parts of the tree of function calls, testing it with one mapping.

mamapitufo11:05:59

it's my favourite feature so far :)

🎉 4
dave00:05:44

it's so good!

Olical14:05:10

Should the HUD pop up while you're evaluating a form to replace it? :thinking_face: I have form replace eval working btw 😄

Olical14:05:24

The HUD just flashes up, which is annoying for small evals, but useful for long evals

Olical14:05:11

I think I'll suppress it.

Olical14:05:02

Also, should I move the cursor to the start of the replaced text? If I do, it'll be annoying with long evals since your cursor gets yanked around.

Olical14:05:13

using <prefix>e! as a default.

Olical15:05:29

I'm going to optimise the UX for quick evaluations with long evals being the edge case that still isn't that bad.

Olical15:05:08

So that means suppressing the HUD and moving the cursor for you, I think it's better on average.

nate15:05:03

I think this is a good position.

👍 8
dave20:05:48

+1 bonus points if you can get the result to blink so that it's super obvious what was inserted 🙂

Olical15:05:00

Pushed to develop! Check out :help conjure for the info on it and config for the mapping.

Olical15:05:05

<prefix>e! will replace the form under your cursor with the result of the eval (in Fennel or Clojure!). It'll move your cursor to the start of the result. You can leave the window after starting the eval and it will still work. If you edit the buffer after you start the eval though... all bets are off.

Olical15:05:13

The main use case should be pretty quick evals so it's all good.

Olical15:05:46

If you want to evaluate a single word rather than a form, I'm afraid you'll have to wrap it in a (do ...) for now, I haven't got a mapping for anything other than current form since I think that's the main use case.

Olical15:05:11

Let me know what you think, intrepid develop testers! 😄

Olical15:05:58

If having "insert result of eval at mark here" is a thing that would be suuuuper useful for a lot of people I'll have to give it a rethink.

Olical15:05:03

Or have two implementations.

Olical15:05:23

I think replace with result and a sort of "insert the result of the next eval at my cursor" are two different things :thinking_face:

nate17:05:18

@olical eval and replace works perfectly! thanks for adding it!