New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reorganize cider keys in handy prefix keymaps #692
Comments
The general idea is that we use I've been thinking of extracting lots of related commands in separate keymaps, but I'd still like to have most common ops quickly accessible. Apart from the doc keymap which more or less exists right now I was thinking of having test related and pretty-printing commands separated from the rest. The keybindings are definitely a moving target right now, hopefully we'll settle on something sane by 1.0. |
"Common" is subjective. I personally don't use a lot of shortcuts in cider map but tend to use things that are not there. Like toggle-cider-pp and cider-restart. All I ask is to try to be forward looking and reserve the handy C-c keys on the left side for key-maps: C-c C-d, C-c C-s, C-c C-e, C-c C-t, C-c C-a. The most essential is the development map; cider-tracing provides only one command and it already has no other choice than to bind it to the awful C-c M-t . Just imagine dozens of development commands as in my example above. Where do you plan to fit all those? The handy C-c C-t is already taken for a marginally useful command, which easelly could be living on C-c C-t C-t. A combo which is almost as fast as C-c C-t itself. |
A consideration: Keybindings defined by a major mode are automatically included in the ouptut of This is an issue now, of course, but if CIDER doubles down on keymaps it will become a good deal worse. The obvious fix is to manually document the keymaps in the mode docstring. |
I'd like to add a few thoughts on keymaps.
|
Yeah, I agree that this is pretty subjective.
Some of the comments here are a bit outdated. I don't have any issues with meta keybindings, but don't mind reducing their number if we can do this in a sensible manner. |
Well, you just complained that you have to find one (right) conrol key, but with combos like Right or left, doesn't matter to me personally, as long as there are good mnemonics for them. The problem is that all of them have to start with |
No, I use the left control for both C-c and C-n. IMO C-c is a breeze to hit with just left hand, because the distance between But this is getting terribly technical. I agree mnemonic is more important. |
I'm a touch typist and I alternate between the two control keys without even thinking about it. I feel that distributing the typing between both hands is generally the best thing you can do. |
I am also a touch typist and
Agree but not within a single combo sequence. Would be nice to have right-hand alternative to |
I'm closing this due to lack of activity. I agree we can do better, but there are no concrete action steps here. |
Hi,
I must admit that my only real issue with cider is its somewhat ad-hoc key bindings. My brain cries each time I press C-c M-n instead of C-c C-n and the other way around. My personal opinion is that C-c M- style shortcuts are confusing and are difficult to type and remember.
This is a proposal for a bunch of keymaps with examples of already existing and potential new functionality. Besides the obvious consistency and simplification of the key memorization, it would allow users and auxiliary packages to add keys without risking to interfere too much with the core binding. Taking into account the ever expanding clojure/cider functionality, prefix keymaps is the only viable strategy in the long run.
The maps should preferably be left-handed so that you can keep your right pinkie on control while pressing the full combo. The core maps are
cider-doc-map
,cider-dev-map
,cider-extra-map
,cider-nsconbuf-map
andcider-inspector-map
.C-c C-d
cider-doc-map
is already thereC-c C-t for
cider-dev-map
(orcider-trace-map
). Inspired by ESS.r . cider-test-run-tests
R . cider-test-rerun-tests
P . cider-test-show-report
b . Set breakpoint
B . Set conditional BP
k . Kill BP
K . Kill all BPs
o . Toggle BP state
l . Set logger BP
n . Goto next BP
p . Goto previous BP
` . Show traceback
~ . Show callstack
e . Toggle error action
d . Flag for debugging
t . cider-toggle-trace
u . Unflag for debugging
w . Watch window
M-C . Continue
M-C-C . Continue multi
M-N . Next step
M-C-N . Next step multi
M-U . Up frame
M-Q . Quit debugging
C-c C-e for
cider-extra-map
. All the handy miscellaneous command are defined. These are the ESS extra commands at this time:d ess-dump-object-into-edit-buffer
e ess-execute
i ess-install-library
l ess-load-library
s ess-set-style
t ess-build-tags-for-directory
w ess-execute-screen-options
/ ess-set-working-directory
C-c C-s
cider-nsconbuf-map
namespace, connection and buffer managers:n cider-eval-ns-form
r cider-repl-set-ns
i cider-inspect
c cider-change-connection
C cider-display-current-connection-info
C-s r cider-switch-to-repl-buffer
C-s n cider-switch-to-nrepl-connection-buffer
C-s e cider-switch-to-error-buffer
C-s i cider-switch-to-inspector-buffer
o cider-find-and-clear-repl-buffer
g cider-refresh
q cider-quit
C-c i cider inspector keymap
o cider-inspect-object
n cider-inspect-namespace
c cider-inspect-class-hierarchy
C-c C-a cider-analyze keymap. In a long term a map for analytic functionality. Either code analysis or actual data analysis.
The text was updated successfully, but these errors were encountered: