Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -206,7 +206,7 @@ Returns to the buffer in which the command was invoked." | |
(define-key map (kbd "C-c C-k") #'cider-load-buffer) | ||
(define-key map (kbd "C-c C-l") #'cider-load-file) | ||
(define-key map (kbd "C-c C-b") #'cider-interrupt) | ||
(define-key map (kbd "C-c ,") #'cider-test-commands-map) | ||
(define-key map (kbd "C-c t") #'cider-test-commands-map) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
Malabarba
Member
|
||
(define-key map (kbd "C-c C-t") #'cider-test-show-report) | ||
This comment has been minimized.
Sorry, something went wrong. |
||
(define-key map (kbd "C-c M-s") #'cider-selector) | ||
(define-key map (kbd "C-c M-r") #'cider-rotate-default-connection) | ||
|
@@ -242,7 +242,7 @@ Returns to the buffer in which the command was invoked." | |
["Go back" cider-pop-back]) | ||
("Test" | ||
["Run test" cider-test-run-test] | ||
["Run namespace tests" cider-test-run-tests] | ||
["Run namespace tests" cider-test-run-ns-tests] | ||
["Run all loaded tests" cider-test-run-loaded-tests] | ||
["Run all project tests" cider-test-run-project-tests] | ||
["Rerun failed/erring tests" cider-test-rerun-tests] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -118,16 +118,16 @@ | |
|
||
(defvar cider-test-commands-map | ||
(let ((map (define-prefix-command 'cider-test-commands-map))) | ||
(define-key map (kbd ",") #'cider-test-run-tests) | ||
(define-key map (kbd "M-,") #'cider-test-run-test) | ||
(define-key map (kbd "C-,") #'cider-test-rerun-tests) | ||
(define-key map (kbd "<") #'cider-test-run-loaded-tests) | ||
(define-key map (kbd "M-<") #'cider-test-run-project-tests) | ||
(define-key map (kbd "r") #'cider-test-rerun-tests) | ||
This comment has been minimized.
Sorry, something went wrong.
bbatsov
Member
|
||
(define-key map (kbd "t") #'cider-test-run-test) | ||
(define-key map (kbd "n") #'cider-test-run-ns-tests) | ||
(define-key map (kbd "l") #'cider-test-run-loaded-tests) | ||
(define-key map (kbd "p") #'cider-test-run-project-tests) | ||
map)) | ||
|
||
(defvar cider-test-report-mode-map | ||
(let ((map (make-sparse-keymap))) | ||
(define-key map (kbd "C-c ,") #'cider-test-commands-map) | ||
(define-key map (kbd "C-c t") #'cider-test-commands-map) | ||
(define-key map (kbd "M-p") #'cider-test-previous-result) | ||
(define-key map (kbd "M-n") #'cider-test-next-result) | ||
(define-key map (kbd "M-.") #'cider-test-jump) | ||
|
@@ -383,7 +383,7 @@ With the actual value, the outermost '(not ...)' s-expression is removed." | |
(cond ((stringp ns) ns) | ||
((eq :non-passing ns) "failing") | ||
((eq :loaded ns) "all loaded") | ||
((eq :project ns) "all"))) | ||
((eq :project ns) "all project"))) | ||
(unless (stringp ns) " namespaces")))) | ||
|
||
(defun cider-test-echo-summary (summary results) | ||
|
@@ -569,8 +569,8 @@ are highlighted." | |
(interactive) | ||
(cider-test-execute :project)) | ||
|
||
(defun cider-test-run-tests (suppress-inference) | ||
"Run all tests for the current Clojure source or test report context. | ||
(defun cider-test-run-ns-tests (suppress-inference) | ||
"Run all tests for the current Clojure namespace context. | ||
With a prefix arg SUPPRESS-INFERENCE it will try to run the tests in the | ||
current ns." | ||
|
8 comments
on commit 5682631
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bbatsov @Malabarba Since we're going to break the old keybindings, I think we should pick one convention. Either:
C-t , t
C-t , r
or
C-c C-t C-t
C-c C-t C-r
My preference is the former.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C-t , t
C-t , r
I guess you meant to write C-c , t/r
. Frankly, I don't see the harm in having two prefixes for the next release and I definitely prefer having something more meaningful as C-c C-t
as the prefix. One of my big goals is to make cider more approachable to newcomers, so we should try to be more consistent with our keybindings.
And it's also important to note that power users can always tweak those. I've done something similar for my Projectile project - scroll to the instructions right after the keybindings table here https://github.com/bbatsov/projectile#interactive-commands
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw, you should also take a look at the failure here https://travis-ci.org/clojure-emacs/cider/jobs/107199514
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bbatsov Yep, pardon my typo! I'm all for consistency; that's why I'm raising an eyebrow at introducing multiple prefixes for the same thing. That said, your point about being approachable is well taken.
If we're to have both C-c C-t
and C-c ,
as prefixes, which one would you like displayed in menus?
(Also, I will look at that test failure. Good tip.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we're to have both C-c C-t and C-c , as prefixes, which one would you like displayed in menus?
C-c C-t
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, updated in 3a4cdb3.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make that 813928a...to fix the build error mentioned above.
We can't use such a prefix - http://www.gnu.org/software/emacs/manual/html_node/elisp/Key-Binding-Conventions.html (amusingly I've misled you yesterday -
C-c ,
wasn't reserved for the users; no idea who came up with this exception).Btw, turns out our old prefix was actually allowed.