Fork me on GitHub
#vim
<
2020-08-17
>
bendy06:08:25

Hey guys - I posted this question in #conjure on Friday, the key bindings are for conjure but this is really a workflow issue. Does anyone have any suggestions on what I'm doing wrong / what I could do better?

orestis09:08:46

Save the file perhaps?

bendy10:08:47

@orestis it's still running the new code - the problem is that the deftest declared a test foo in the namespace in the running REPL session. I'm not sure how to clear out the namespace in the current REPL session without destroying it and starting all over again

orestis10:08:17

Ah. Perhaps (def foo nil) ?

orestis10:08:33

There’s probably a better way to remove a var from a ns.

Olical10:08:53

I'm on a boat trip until the weekend with my family but no, not yet, I usually just write out ns-unalias call and eval that. Which could totally be rigged up to a custom mapping calling through to ConjureEval. I'm sorry I can't help more this week! Learning how to drive and moor a boat is almost as hard as naming things in code

noisesmith13:08:14

@bendy you can use remove-ns to completely destroy the ns including all its definitions, then load the whole file to recreate it

Olical18:08:28

Ohhh this is a really neat idea to be honest! I should look at adding some undef mappings for things like the word under your cursor or your whole file.

jamesleonis16:08:46

@bendy You might also look into clojure.tools.namespace.repl/reload