Quick poll. When do you have to search by regex in clojure/clojurescript and why? two examples: • i use clj find in small clojure projects over regex bc its more direct. I cant use it on clojurescript (not supported) • i just discovered cider-find-var (whatever that does) works in clojurescript.
I am trying out helm-imenu-in-all-buffers
which lists all functions, defs and spec defs, grouped by namespace. If all the buffers are open for a project, then you will see all the functions
Obviously this brings in all the namespaces from all the buffers, so you get far more that you may want, but its in a helm popup and will narrow function names. Not quite there, but another useful tool.
SPC s j
(also SPC j i
) is fantastic.
cider-find-var
should jump to the definition of the var (e.g. def
, defn
name) under the cursor, or ask for a var name in the mini-buffer if the cursor is not on a var name.
, g g
is bound to spacemacs/clj-find-var
and will use the CIDER function when the REPL is running and dumb-jump-go
without a REPL.
I use , g g
- cider-find-var
to jump to the definition of a function I am calling (the same key binding is in most language layers in Spacemacs).
For everything else I use helm-swoop
, SPC s s
within the current buffer or spacemacs/helm-project-smart-do-search
, SPC /
or SPC s p
to search across projects.
I just noticed SPC s j
(`lazy-helm/spacemacs/helm-jump-in-buffer`) which lists all the vars of the current buffer in a helm pop-up, selecting one jumps to that definition. It works on spec/def and clojure.test/deftest too, although not on spec/fdef (might need to get that added to Cider?)
a version that lists every function in the current project would probably also be great. But this was useful, thanks @jr0cket