Fork me on GitHub
New To Clojure18:12:56

Is it possible to jump to previous position of cursor somehow (and to previous of previous of previous too)? For example, I switched to definition of a symbol or used incremental search and want to go back a few times.


Did you jump to definition using CIDER's M-.? If so I recommend: `M-, runs the command cider-pop-back (found in cider-mode-map), which is an alias for ‘xref-pop-marker-stack’ in ‘cider-util.el’.`

New To Clojure14:12:47

@U05092LD5 That's exactly what I'm doing. Thank you a lot, will use M-,.


that's what the jump-list is for in evil


if you aren't using evil you can pop marks, I think?

New To Clojure19:12:36

@chris pop-global-mark is a bit crude. It works for switching back to previous buffer but doesn't accurately remember previous positions of cursor in the same buffer. Thank you, it's better than nothing so I will find uses for that.


@ghsgd2 if you're using evil mode, I suggest evil-jump-backward. Typically bound to C-o, I believe.


Theoretically C-i takes you back forward, but it doesn't work for me.


C-i doesn't work because of some obscure emacs stuff


you can get it to work with a hack


(keyboard-translate ?\C-i ?\H-i) (global-set-key [?\H-i] 'evil-jump-forward)


those two lines will reenable C-i


basically, it routes it through the Hyper keymap (which nothing uses because no one really has a Hyper key) and maps something in the hyper keymap to jump forward


I don't remember why that's necessary in the first place though


or if you're on spacemacs you can just use dotspacemacs-distinguish-gui-tab t in the init function

New To Clojure20:12:56

@eggsyntax, @chris Thank you! I think it's time for me to learn evil mode. 🙂


I'm certainly a fan. But I came from vim, so it was a no-brainer for me.


i find the lisp manipulation a little more awkward in spacemacs' lisp mode, but maybe that's just because my paredit muscle memory got really deep


in particular spacemacs seems to lack an equivalent to C-M-d (go down one sexp) which often leaves me feeling lost and just hjkl'ing like a pleb