add key bindings for profiling and spec browsing

This commit is contained in:
Luo Tianj 2018-02-19 17:00:21 +08:00 committed by syl20bnr
parent d2458eb974
commit 280c7b4cef
2 changed files with 27 additions and 1 deletions

View File

@ -36,6 +36,7 @@
- [[#sayid-traced-mode][sayid-traced-mode]]
- [[#sayid-pprint][sayid-pprint]]
- [[#cider-repl-mode][cider-repl-mode]]
- [[#profiling][Profiling...]]
- [[#development-notes][Development Notes]]
- [[#indentation][Indentation]]
@ -198,6 +199,8 @@ As this state works the same for all files, the documentation is in global
| ~SPC m g r~ | goto resource |
| ~SPC m g n~ | browse namespaces |
| ~SPC m g N~ | browse all namespaces |
| ~SPC m g s~ | browse spec |
| ~SPC m g S~ | browse all specs |
*** REPL
@ -436,6 +439,16 @@ In general, ~q~ should always quit the popped up buffer.
| ~C-j~ | next input |
| ~C-k~ | previous input |
*** Profiling...
| Key Binding | Description |
|-------------+-------------------|
| ~SPC m p t~ | toggle profile |
| ~SPC m p c~ | clear profile |
| ~SPC m p s~ | profile summary |
| ~SPC m p S~ | summary for all |
| ~SPC m p n~ | toggle profile ns |
* Development Notes
** Indentation
With a [[https://github.com/clojure-emacs/cider/blob/master/doc/indent_spec.md][new]] functionality of Cider to read the custom indentation rules from the

View File

@ -65,7 +65,9 @@
("ms" . "repl")
("mt" . "test")
("mT" . "toggle")
("mf" . "format"))))
("mf" . "format")
("mp" . "profile")
)))
(dolist (m '(clojure-mode
clojurec-mode
clojurescript-mode
@ -103,6 +105,8 @@
"gr" 'cider-find-resource
"gn" 'cider-browse-ns
"gN" 'cider-browse-ns-all
"gs" 'cider-browse-spec
"gS" 'cider-browse-spec-all
"'" 'cider-jack-in
"\"" 'cider-jack-in-clojurescript
@ -147,6 +151,15 @@
"de" 'spacemacs/cider-display-error-buffer
"dv" 'cider-inspect
;; profile
"pt" 'cider-profile-toggle
"pc" 'cider-profile-clear
"pS" 'cider-profile-summary
"ps" 'cider-profile-var-summary
"pn" 'cider-profile-ns-toggle
"pv" 'cider-profile-var-profiled-p
"p+" 'cider-profile-samples
;; refactorings from clojure-mode
"rc{" 'clojure-convert-collection-to-map
"rc(" 'clojure-convert-collection-to-list