-
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
holy-mode: Assume we are always in emacs state #3497
Conversation
This PR removes too much stuff. We only need to not override the |
You can switch editing styles dynamically with this. |
Perfect 👍 You should make several commits then, in its current state this commit tells the why but not the what and how (which are more important to me, for the why just use issue ids with |
ok, I can do that. No problem |
@syl20bnr It's split into two commits |
On second thought maybe there should be a variable that allows the old behavior too |
The variable `evil-buffer-regexps` overrides setting the initial evil state based on mode, so all we do now is to set all buffers' initial states to emacs using this variable. This avoids having to manage the mode-specific state variables in evil.
We should not assume that users of holy mode are aware of evil and normal state. Users were accidentally escaping into normal state with ESC under the old implementation and didn't know how to return given that they assumed they were only using emacs key bindings. Fixes #3495, #3473 and #3453. Introduce a new variable `holy-mode-allow-esc-to-normal-state` to allow for the old behavior if users want to set this explicitly.
The old behavior is hybrid no ? I have to look at those evilified state in hybrid state, I know we have a PR you submitted but maybe we just need a global toggle for evilification instead ? |
No not really. The old behavior was to always start in emacs state, allow
|
If we can toggle off the evilification, hybrid looks like the old behaviour to me. And I like the fact that having ESC to switch to normal state is an hybrid thing. |
Ah there is the default state too. All these can be hybrid options. Actually should be hybrid options from the beginning. |
I think it shouldn't be that hard to have a mode that disables evil entirely and makes the right adjustments for the mode-line, helm, etc. Is that what you mean by "as authentic as possible"? Also there's another distinction between hybrid and emacs that's relevant to these issues. The reason these issues came up is because some people want to use ESC as a meta key, which is only possible with evil on in emacs state. Since hybrid uses a variation of insert state, this could be tricky to disable there. |
I was not very clear sorry.
|
Hybrid without normal state is not hybrid in my opinion so it makes little sense to remove ESC. |
I would prefer the current hybrid left untouched. Yes, hybrid without normal mode is almost emacs state then. I even prefer buffers be opned in normal state even if I'm using hybrid, only when I enter insert state I should have all keys as emacs way for editing text, but for getting out of that state let it be |
Hybrid will be left untouched, those would be options to alter it, default values will setup the hybrid as it is right now. |
Closing in favor of #3514 |
There's some confusion about holy-mode, because users are accidentally
getting into another evil state and don't know what to do. The
assumption should be that if holy mode is enabled we are always in
emacs state, so we don't provide any easy means of getting out of it.
#3495
#3473
#3453