diff options
author | Bozhidar Batsov <bozhidar@batsov.com> | 2016-05-13 11:59:19 -0500 |
---|---|---|
committer | Bozhidar Batsov <bozhidar@batsov.com> | 2016-05-13 11:59:19 -0500 |
commit | 5ba5091b60d28e8cc8e6a266295efeba88769ad0 (patch) | |
tree | 47c32e331634926f134eb68cc3b6ad570685a45a | |
parent | 88559783f98a58e6c03f16fe585febbab7e53525 (diff) |
Introduce a common prefix for some evaluation commands that aren't used
frequently
This also solve the `C-c C-r` conflict with recent clojure-mode versions.
-rw-r--r-- | CHANGELOG.md | 5 | ||||
-rw-r--r-- | cider-mode.el | 10 | ||||
-rw-r--r-- | doc/interactive_programming.md | 8 |
3 files changed, 13 insertions, 10 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 055ed250..a9bbfc4c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,7 @@ used in a project, particular if it is lower than minimum required for CIDER. * Allow the ns displayed by eldoc to be tailored via `cider-eldoc-ns-function`. * After connecting a ClojureScript REPL, CIDER will try to figure out if it's being served on a port and will offer to open it in a browser. -* [#1720](https://github.com/clojure-emacs/cider/issues/1720): Add a command `cider-eval-sexp-at-point` to evaluate the form around point (bound to `C-c C-v`). +* [#1720](https://github.com/clojure-emacs/cider/issues/1720): Add a command `cider-eval-sexp-at-point` to evaluate the form around point (bound to `C-c C-v v`). * [#1564](https://github.com/clojure-emacs/cider/issues/1564): CIDER's internal namespaces and vars are filtered from the ns-browser and apropos functions. * [#1725](https://github.com/clojure-emacs/cider/issues/1725): Display class names in eldoc for interop forms. @@ -27,6 +27,9 @@ * Signal `user-error` instead of `error` on jack-in if a project type is not supported. * Users with `boot.sh` instead of `boot` should customize `cider-boot-command` instead of relying on automatic detection. * [#1737](https://github.com/clojure-emacs/cider/issues/1737): Show value of locals in debugger tooltip. +* Rebind `cider-eval-last-sexp-and-replace` to `C-c C-v w`. +* Rebind `cider-eval-region` to `C-c C-v r`. +* Rebind `cider-eval-ns-form` to `C-c C-v n`. ### Bugs fixed diff --git a/cider-mode.el b/cider-mode.el index 392b453d..90890bb2 100644 --- a/cider-mode.el +++ b/cider-mode.el @@ -287,15 +287,15 @@ Configure `cider-cljs-lein-repl' to change the ClojureScript REPL to use."] (define-key map (kbd "C-c C-c") #'cider-eval-defun-at-point) (define-key map (kbd "C-x C-e") #'cider-eval-last-sexp) (define-key map (kbd "C-c C-e") #'cider-eval-last-sexp) - (define-key map (kbd "C-c C-w") #'cider-eval-last-sexp-and-replace) - (define-key map (kbd "C-c C-v") #'cider-eval-sexp-at-point) + (define-key map (kbd "C-c C-v w") #'cider-eval-last-sexp-and-replace) + (define-key map (kbd "C-c C-v r") #'cider-eval-region) + (define-key map (kbd "C-c C-v n") #'cider-eval-ns-form) + (define-key map (kbd "C-c C-v v") #'cider-eval-sexp-at-point) (define-key map (kbd "C-c M-;") #'cider-eval-defun-to-comment) (define-key map (kbd "C-c M-e") #'cider-eval-last-sexp-to-repl) (define-key map (kbd "C-c M-p") #'cider-insert-last-sexp-in-repl) (define-key map (kbd "C-c C-p") #'cider-pprint-eval-last-sexp) (define-key map (kbd "C-c C-f") #'cider-pprint-eval-defun-at-point) - (define-key map (kbd "C-c C-r") #'cider-eval-region) - (define-key map (kbd "C-c C-n") #'cider-eval-ns-form) (define-key map (kbd "C-c M-:") #'cider-read-and-eval) (define-key map (kbd "C-c C-u") #'cider-undef) (define-key map (kbd "C-c C-m") #'cider-macroexpand-1) @@ -678,7 +678,7 @@ See \(info \"(elisp) Special Properties\")" (when cider--debug-mode (let* ((locals (nrepl-dict-get cider--debug-mode-response "locals")) (local-val (cadr (assoc sym locals)))) - (format " with value:\n%s" local-val)))) + (format " with value:\n%s" local-val)))) (let* ((info (cider-sync-request:info sym)) (candidates (nrepl-dict-get info "candidates"))) (if candidates diff --git a/doc/interactive_programming.md b/doc/interactive_programming.md index 1591601c..9f888fef 100644 --- a/doc/interactive_programming.md +++ b/doc/interactive_programming.md @@ -19,19 +19,19 @@ Here's a list of `cider-mode`'s keybindings: Keyboard shortcut | Description --------------------------------------|------------------------------- <kbd>C-x C-e</kbd> <br/> <kbd>C-c C-e</kbd>| Evaluate the form preceding point and display the result in the echo area and/or in an buffer overlay (according to `cider-use-overlays`). If invoked with a prefix argument, insert the result into the current buffer. -<kbd>C-c C-w</kbd> | Evaluate the form preceding point and replace it with its result. +<kbd>C-c C-v w</kbd> | Evaluate the form preceding point and replace it with its result. <kbd>C-c M-e</kbd> | Evaluate the form preceding point and output it result to the REPL buffer. If invoked with a prefix argument, takes you to the REPL buffer after being invoked. <kbd>C-c M-p</kbd> | Load the form preceding point in the REPL buffer. <kbd>C-c C-p</kbd> | Evaluate the form preceding point and pretty-print the result in a popup buffer. <kbd>C-c C-f</kbd> | Evaluate the top level form under point and pretty-print the result in a popup buffer. <kbd>C-M-x</kbd> <br/> <kbd>C-c C-c</kbd> | Evaluate the top level form under point and display the result in the echo area. -<kbd>C-c C-v</kbd> | Evaluate the form around point. +<kbd>C-c C-v v</kbd> | Evaluate the form around point. <kbd>C-u C-M-x</kbd> <br/> <kbd>C-u C-c C-c</kbd> | Debug the top level form under point and walk through its evaluation -<kbd>C-c C-r</kbd> | Evaluate the region and display the result in the echo area. +<kbd>C-c C-v r</kbd> | Evaluate the region and display the result in the echo area. <kbd>C-c C-b</kbd> | Interrupt any pending evaluations. <kbd>C-c C-m</kbd> | Invoke `macroexpand-1` on the form at point and display the result in a macroexpansion buffer. If invoked with a prefix argument, `macroexpand` is used instead of `macroexpand-1`. <kbd>C-c M-m</kbd> | Invoke `clojure.walk/macroexpand-all` on the form at point and display the result in a macroexpansion buffer. -<kbd>C-c C-n</kbd> | Eval the ns form. +<kbd>C-c C-v n</kbd> | Eval the ns form. <kbd>C-c M-n</kbd> | Switch the namespace of the REPL buffer to the namespace of the current buffer. <kbd>C-c C-z</kbd> | Switch to the relevant REPL buffer. Use a prefix argument to change the namespace of the REPL buffer to match the currently visited source file. <kbd>C-u C-u C-c C-z</kbd> | Switch to the REPL buffer based on a user prompt for a directory. |