Open Invertisment opened 2 years ago
I don't use evil-mode
, so it's hard for me to comment on what's the best course of action here. I'm open to suggestions, as long as they are not going to add complexity or degrade the existing experience.
I also tried to change the cider-inspector mode to use cider-mode
instead of the special mode (then restarting cider to test it and so on) but I think I didn't know what I was doing and it didn't work. So I'm not even sure how to make it work so that it could bind the keys from the start.
i.e. I don't know how to make it work even in the way that would break all modes.
Hey. I'm an
evil-mode
user and something that bothers me is that I can't go tocider-inspector
and usef{
key to jump to first curly paren.This happens because
cider-inspector
(and others derived modes in CIDER) are implemented in a specific way that prevents allevil-mode
repeats and jumps. This goes the same for Test-Summary mode and other CIDER modes.j
andk
keys work and to use<M-5>
I have to move my fingers from home row. I think that pressingAlt+5 Ctrl+N
to move five lines down is moving too many fingers.But what's more interesting is that
cider-result
is read-only but it isn't implemented using these Emacs's special modes and it allows to jump around. REPL mode doesn't fall into this category because it's allowed to edit the buffer. Main mode allows to edit the buffer too.Is your feature request related to a problem? Please describe.
The problem with this is that I tried to use
add-hook
to enablemotion-state
ofevil-mode
but when I use it oncider-inspector
then it switches the mode back on immediately. This makes it so that I can't apply evil-mode's bindings at all.Describe the solution you'd like
I would like you to consider implementing these modes (or providing an alternative) that would allow to conditionally not use Emacs's special modes. I really like how basic the
result-mode
is and I would like that it could be somehow used in here too.One of the more basic solutions would probably be to allow editing in all of the modes. What are we preventing ourselves from? We already know that we shouldn't edit there. That would break the keys that you defined but it's still something to think about. As one wise man have said: "You can tell a kid not to put a spoon in a blender and turn it on and they'll remember that for the rest of their lives". Source: https://youtu.be/aSEQfqNYNAc?t=201 So... I'm not too happy of what Emacs gives in this mode. It prevents me from doing what I want to do. The function that creates
cider-inspect
is calledderive
which means it's an inheritance, as in Java. And it means that as a programmer I can't change what it is.Describe alternatives you've considered
I tried to do then my
add-hook
and I tried to manually enable themotion-state
by calling the function from the GUI. The function resets the bindings to what I would want to work with (I think that I'd then bind the keys myself if it would work) but as the mode reloading hook happens it resets the mode and removes my enabledmotion-state
. Basically this means that if I go into a child element ofcider-inspector
usingmotion-state
is replaced bycider-inspector
major mode which isspecial-mode
of Emacs and which doesn't havef{
and5j
evil-mode
motion keys.I know it's a lot to ask but Conjure in Neovim doesn't have much of the functionality that CIDER has and Emacs's "way" is to move my fingers away from the home row (namely click Ctrl and Alt all the time). It's fine to click Ctrl and Alt once in a while but I don't think it's a good way to work.
Additional context I use Spacemacs