Fork me on GitHub
#cider
<
2017-06-15
>
benny05:06:10

how does one go do the definition of a function in cider?

benedek06:06:36

M-. usually

benedek06:06:59

and M-, to jump back

jumar06:06:55

Yes, it's usually M-. and the command is called cider-find-var - see https://cider.readthedocs.io/en/latest/interactive_programming/. In spacemacs it's also aliased as spacemacs/jump-to-definition and it's bound to , g g in evil mode

dpsutton06:06:43

note these require an active repl session to work. they are not textual in emacs but hits the repl itself

Sam H09:06:45

i usually use gd (evil mode) and for me the code needs to be loaded into the repl for it to work (for clojure anyway)

benny16:06:25

I've done a cider-jack-in and tried M-. but it just prompts me for Symbol:

Sam H16:06:33

benny: have you loaded your forms into the repl? (`SPC m s b` sends the buffer to the repl)

dpsutton16:06:23

then put your cursor on a symbol that you want to see the source of. Pressing M-. should give the prompt at the bottom along with the symbol under your cursor (called thing at point in emacs parlance)

benny16:06:43

thanks guys!

agile_geek19:06:01

You can jump straight to the current symbol under point (cursor) by using the prefix argument key binding C-u i.e. C-u M-.

agile_geek19:06:18

and you can jump back to where you came from with M-,