Skip to content

Commit

Permalink
Add a REPL shortcut for cider-repl-require-repl-utils
Browse files Browse the repository at this point in the history
This makes it easy to require common REPL utility functions like `doc`,
`source`, etc. in REPL buffers. Those utils are auto-required in the initial
namespace (typically `user`), but you have to require them yourself after
switching to new namespaces.
  • Loading branch information
bbatsov committed Dec 10, 2017
1 parent f7f1256 commit 254f17d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

* [#2082](https://github.com/clojure-emacs/cider/pull/2082), [cider-nrepl#440](https://github.com/clojure-emacs/cider-nrepl/pull/440): Add specialized stacktraces for clojure.spec assertions.
* [#2111](https://github.com/clojure-emacs/cider/pull/2111): Add `cider-pprint-eval-last-sexp-to-comment` and `cider-pprint-eval-defun-to-comment`.
* Add a REPL shortcut for `cider-repl-require-repl-utils` (this makes it easy to require common functions like `doc`, `source`, etc. in REPL buffers).

### Changes

Expand Down
2 changes: 2 additions & 0 deletions cider-repl.el
Original file line number Diff line number Diff line change
Expand Up @@ -1381,6 +1381,7 @@ constructs."
(cider-repl-add-shortcut "quit" #'cider-quit)
(cider-repl-add-shortcut "restart" #'cider-restart)
(cider-repl-add-shortcut "version" #'cider-version)
(cider-repl-add-shortcut "require-repl-utils" #'cider-repl-require-repl-utils)

(defconst cider-repl-shortcuts-help-buffer "*CIDER REPL Shortcuts Help*")

Expand Down Expand Up @@ -1507,6 +1508,7 @@ constructs."
"--"
["Set REPL ns" cider-repl-set-ns]
["Toggle pretty printing" cider-repl-toggle-pretty-printing]
["Require REPL utils" cider-repl-require-repl-utils]
"--"
["Browse classpath" cider-classpath]
["Browse classpath entry" cider-open-classpath-entry]
Expand Down

1 comment on commit 254f17d

@dpsutton
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a fantastic change. i'm loving this

Please sign in to comment.