Fork me on GitHub

Hi all, (hopefully) a quick question: do you have working keybindings for the cider inspector from spacemacs? For example, I am trying to get it to go back a page with no success using the M-SPC command or by calling M-x cider-inspector-prev-page.


Hello @rowanharg SPC SPC cider-inspect-last-result may be what you are looking for. I havent found a keybinding, so sounds like a pull request


SPC e v? comma e v


previous page is L


Hi @jr0cket - sorry, my question was imprecise. I use cider-inspect-last-result to start the inspector but my question was about navigation once in the inspector. I can tab onto elements that cab be navigated, with RET but then not go back up.


Thanks! @aisamu That was exactly what I was looking for!

😉 4

Just to clarify comma e v will eval and open the inspector. Also don't worry if the cider-inspect-last-result doesn't work during debugging, that seems to be the case 😕


ah great, I was just going to ask about comma e v. Thanks!


Hmm, comma e v is undefined.


@rowanharg I use , d v to open the value inspector, opening a read-only buffer with the value of the expression or symbol. Using RET to drill down on values in the cider-inspect buffer. Thanks @aisamu for the tip about L, most useful to know (I was trying to use hand H as I thought that would be a logical choice for a vim-style binding).


Its , d v in the develop branch, this may be different in master


@jr0cket , d v works for me. Thanks!


@jr0cket oh my, you're absolutely right - the correct is , d v not , e v... muscle memory is apparently a thing 😛

👍 4

I would never have thought to use L for going back... so thanks again


You're very welcome - you've recently saved me with the new enable-refactoring flag...

bananadance 4

On the topic of debugging, I am quite impressed by the debugging you can do even without the sayid package enabled. I havent use debugging or the inspector that much in Clojure, but I am starting to get into it. Instrumenting a function with , d b and then calling that function and stepping through the values as it evaluates is really great way to see what is going on. I hope to get use to this soon and create some nice screencasts for debugging.


It's very basic but I did one short video back then:


Great video, thanks.


^ this is invaluable, and one of the things I miss the most on cljs


Wow! That's cool!


You can also debug any top level statement with , d b (but with the cursor before, IIRC)

👍 4

Inspired by Stu Halloway's recent talks on RDD, I was trying to explain to a friend about the tangibility of Clojure. Are there any other resources that you can recommend to learn about this? I also saw Val's What makes a good REPL guide.


Oh I also saw a video of Bozhidar Batsov demonstrating Cider.


@rowanharg not tool specific, but the programming at the repl guide shows you lots of things you can do in a REPL to understand the code and values evaluated

practicalli-johnny13:11:30 also shows you what is possible. Its more live coding than a tutorial, but clearly demonstrates the art of REPL Driven Development


I am adding planning to add content on this topic to, but there is still plenty to add and sections to complete


@jr0cket Thanks for all these!


I shall work my way through your guide


there is plenty of stuff to add to my guide, let me know what things you would find useful for me to add (on top more things about the inspector and debugging)


@jr0cket - Just watched your intro screencast and learned about the green bars in the lefthand side of the buffer corresponding to whether the form hand been evaluated. Thanks!


Have you ever managed to get two repls (one for clojure and one for clojurescript) from one project working at the same time? When I eval forms it always seems to want to send it to the repl that I just connected to.


I think they are improving CIDER to use the right repl based in regard clj and cljs. Not entirely sure where this is at.


I use the figwheel template and clojurescript-jack-in and it fires up two repls, first the clj and then the cljs repl. I almost always evaluate in the source code buffer and I think that gets it right. I think CIDER does need an occasional bit of manual help at the moment


Ah ok. Thanks. I thought it was just me. 🙂