New Keybinding for cider-eval-defun-to-comment

Added a Spacemacs style keybinding for the function cider-eval-defun-to-comment

This function evaluates and expression and displays the result as a comment
on the following line.

The CIDER keybinding is `C-C M-;` so the Spacemacs binding uses the `;`
convention, which is also the general character for comments in Emacs.

As this is an evaluation function, the keybinding is placed under the evaluation
part of the major mode menu.

Included documentation in the README.org file
This commit is contained in:
John Stevenson 2017-05-01 17:53:16 +01:00 committed by syl20bnr
parent a5c94b3328
commit 18a244269b
2 changed files with 2 additions and 0 deletions

View file

@ -133,6 +133,7 @@ As this state works the same for all files, the documentation is in global
| Key Binding | Description | | Key Binding | Description |
|-------------+-------------------------------------------------| |-------------+-------------------------------------------------|
| ~SPC m e ;~ | eval sexp and show result as comment |
| ~SPC m e b~ | eval buffer | | ~SPC m e b~ | eval buffer |
| ~SPC m e e~ | eval last sexp | | ~SPC m e e~ | eval last sexp |
| ~SPC m e f~ | eval function at point | | ~SPC m e f~ | eval function at point |

View file

@ -112,6 +112,7 @@
"hj" 'cider-javadoc "hj" 'cider-javadoc
"hn" 'cider-browse-ns "hn" 'cider-browse-ns
"e;" 'cider-eval-defun-to-comment
"eb" 'cider-eval-buffer "eb" 'cider-eval-buffer
"ee" 'cider-eval-last-sexp "ee" 'cider-eval-last-sexp
"ef" 'cider-eval-defun-at-point "ef" 'cider-eval-defun-at-point