-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
C-k should be C-k in helm for hybrid mode. #5237
Comments
I have to disagree. As a Hybrid user, I find Helm, as well as other minibuffer interactions (e.g. Ido and Ivy), aren't strictly "insert" situations. It is very common to select a candidate from a list (e.g. find-file, switch-buffer), and in these cases moving between candidates is more useful than deleting the input (original Another concern is consistency. We use |
I fully agree with @bmag on this. |
Bar notifications@github.com writes:
Ok well here's my argument. If this fails I at least want a way to As a hyrbid user, if C-a, C-e, C-f, and C-b do the emacs things, then I FWIW I use C-n/C-p/M-n/M-p in these situations and expect them to work for Thanks, |
@choppsv1 that's a good argument, especially from an Emacs style point of view. But hybrid style is a merge between Emacs and Vim styles, so we also have to take the Vim side into account. Hybrid is supposed to act as Vim, except for insert state where it should act as Emacs. However, the minibuffer isn't exactly insert state. I think we are arguing here about how much Emacsy or Vimmy the sort-of-like-insert interactions should be. We're talking specifically about the Helm and the minibuffer now, but we can also use the same arguments for popups and repls. Your expectation ("hybrid/emacs") is reasonable, but the other way around is also reasonable ("hybrid/vim"). Honestly, I don't think either one of us is more correct than the other. Looks like a personal preference to me, where the current Spacemacs behaviour just happens to match my preference. It would be nice to have a consistent way to enable/disable vim-like keys in sort-of-but-not-exactly-insert-like interactions. Though it won't exist until somebody implements it, of course. related issue: #5211 |
I have felt the same pain points as @choppsv1 many times, so I must speak out in his favour. Actually another place I encounter this is in company completion. I think the spirit of vim we should embrace for hybrid mode is to use the strengths of modality to the fullest. There's nothing "vimmy" about I should add that hybrid style is specifically a merge of the two styles so that emacs conventions remain untouched while editing, and vim conventions can coexist with chorded keys while navigating. Just adding |
I vote to remove or change Move |
By the way, emacs screws up |
I agree with @justbur on the |
If we draw a segment with Vim and Emacs at the extremes and hybrid somewhere on this segment we end up with a lot of possible hybrid flavours leaning toward more Vim or more Emacs behaviour. My stance on hybrid is this:
It looks to me that in Helm buffers we are in insert state so the Emacs bindings should prevail. Now we can add options to hybrid style if this is reasonable to implement and does not break dynamic switching of style. |
Does that mean |
I don't know the Helm bindings but I guess in hybrid state the default helm key bindings should be available, except if enough users agree on a tweak for them (both hybrid and Emacs style). |
I got used to So looking at helm input line as hybrid insert state, it makes sense to remove |
I'm ok with moving away from |
I think we should keep hjkl in some form for hybrid users. These are from normal mode, and a set of key bindings that they have said that they want (o/w they could pick emacs style). I don't see any big problem from having them on Much more important than that is that the bindings are consistent across spacemacs for these users. Use the defaults is not a good answer if the defaults are inconsistent between helm, ivy, company, etc. |
I've been thinking about this suggestion of using another mapping, and I wonder if we shouldn't use 2 modifiers e.g., C-M-[hjkl] by default to provide a high probability of not clashing with anything else (except maybe org mode which probably uses every combination possible :) That way we could blanket use them everywhere as you say and be consistent. It's useful that you can press the modifiers with one hand and the direction keys with the other so using 2 modifiers isn't much more burdensome than 1. Additionally it would be nice to allow the user to change the default modifier combo to whatever modifiers they want (i.e., put the setting in the spacemacs/layers defun). Chris. |
Re: @justbur
Another interpretation is that hybrid mode users have opted in for modal editing, and don't think that there is anything special about the
But emacs is very consistent in this regard, and I think an option that achieves better modality is leaving the In other words, rather than adding |
If there's a way to add ESC to these minibuffer "apps" which would switch to normal (modal) mode, I'm hugely in favor of adding this capability. This then yields straight-forward vi compatibility not to mention a lot of extra editing functionality. I'd be in favor of adding this everywhere possible, even for standard emacs commands like |
@choppsv1 Try adding the spacemacs-ivy package, and after The reason normal state is not on ESC is because these minibuffers really should go away with one ESC press. |
@sooheon they're not entirely consistent though by default. Helm's tab is very different from ivy's and company's. Company uses M-np for candidate selection while Ivy and helm use C-np. I don't think company uses C-j. I'm sure there are others but these little inconsistencies can get annoying in my opinion even if you learn them eventually |
@justbur Tab being different I think is a different discussion, (after all apps have different functionality) but I stand corrected on the C-np for company, you're correct. I still don't think that is too inconsistent--C-np moves point in the buffer, and M-np moves selection, exactly analogous to defaults in say, eshell (this is why going by memory I saw no inconsistency--because it's idiomatic in emacs-land). In fact, company putting movement on M-np is a good example of deliberately not interfering with readline bindings when editing. In any case, your point still stands, that there will be inconsistencies. The question is, should the inconsistencies be in the realm of accepted variability which emacs package devs chose for their own ecosystem (difference between C-np or M-np, for example, which when you get down to it, still have sensible logic), or should they be overriding expected default behaviour (C-jk) sporadically? My vote is firmly in the former. e: I actually remember having a similar conversation about this before: #1372 (comment) At that time I deferred to popular decision, and simply adjusted my personal settings--still, this issue coming up again shows that it may need rethinking. |
I'm not for a solution that introduces potential new clashes, here is what we can do:
So we don't introduce potential new clashes we just reuse the work done for the Vim users. Remember the analogy of a segment where Vim and Emacs are at the extremes, by default we place Hybrid near Emacs and introduce variables to move the Hybrid point toward the Vim point. |
@choppsv1 This can be closed I think as we have the tooling in place to get the desired behaviour in hybrid mode now. Or |
We'll close this, since the |
Currently
remaps C-k in helm minibuffer to a cute vim inspired C-j/C-k for C-n/C-p functionality. This is fine for vim choice I suppoes; however, in hyrbrid mode one expects emacs editing keys to work when in "insert" situations such as helm minibuffer.
So: we should remove
hyrbid
from the list of modes in the above code.The text was updated successfully, but these errors were encountered: