vim

For discussion on all things (neo)vim.
2020-08-17T06:17:25.038700Z

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?

orestis 2020-08-17T09:54:46.038900Z

Save the file perhaps?

2020-08-17T10:09:47.040200Z

@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

orestis 2020-08-17T10:30:17.040500Z

Ah. Perhaps (def foo nil) ?

orestis 2020-08-17T10:30:33.041Z

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

2020-08-17T10:31:09.041300Z

Is there a feature like undef in conjure? https://liquidz.github.io/vim-iced/vim-iced.html#%3AIcedUndef

Olical 2020-08-17T10:35:53.044400Z

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

2020-08-17T13:59:14.045100Z

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

Olical 2020-08-21T18:23:28.000200Z

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.

jamesleonis 2020-08-17T16:19:46.045800Z

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

jamesleonis 2020-08-17T16:20:30.046Z

https://github.com/clojure/tools.namespace