syl20bnr / spacemacs

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
http://spacemacs.org
GNU General Public License v3.0
23.64k stars 4.89k forks source link

C-k in comint-mode overrides kill-line for hybrid style #5211

Closed nixmaniack closed 8 years ago

nixmaniack commented 8 years ago

With this commit and merger of hybrid state into insert state, this pollutes the insert map of hybrid style users.

@justbur I remember having conversation around this, but not sure what was the solution except using (when dotspacemacs-editing-style...) guard.

I kind of preferred the old hybrid state and hybrid keymap for clear separation from insert state of vim.

AlejandroCatalina commented 8 years ago

I totally agree on this one, hybrid state should be considered as emacs without interfering any other keybindings, IMO.

TheBB commented 8 years ago

Er, that's not the commit that did it. It just changed C-k and C-j around…

nixmaniack commented 8 years ago

@TheBB I actually know it's just a swap! Anyhow, wanted to point out the code responsible for this behaviour.

StreakyCobra commented 8 years ago

We definitively need some sort of high-level guards to deal with all our modes. @AlejandroCatalina implemented one in #5111. There is also #5205 showing a missing functionality. After this one it would be nice to think of a set of guards to easily fix problems like this.

AlejandroCatalina commented 8 years ago

Yeah, I've also noticed that some major modes are exclusively evilified independently of your mode, see elfeed on this one. We should or even create a macro like with-modal-consistency or whatever.

Fabien Dubosson writes:

We definitively need some sort of high-level guards to deal with all our modes. @AlejandroCatalina implemented one in #5111. There is also #5205 showing a missing functionality. After this one it would be nice to think of a set of guards to easily fix problems like this.


Reply to this email directly or view it on GitHub: https://github.com/syl20bnr/spacemacs/issues/5211#issuecomment-188149496

Un saludo, Alejandro Catalina Feliu

justbur commented 8 years ago

This is one place where having an explicit hybrid state makes a difference. Although it's quite unusual to bind a key in insert state anyway.

The problem with the explicit hybrid state is that it's difficult to maintain, because it copied a bunch of internal code from insert state. So if that code changed for some reason, the hybrid state code would need to change to, but that requires someone to manage it. If someone wants to be that person go ahead and revert hybrid mode.

I've also decided I'm not in favor of the idea of adding states to evil. As far as I know, you can't add a mode in vim, so even though vim users are familiar with the idea of modal editing they are not familiar with arbitrary modes beyond the usual normal, insert, visual, etc.

syl20bnr commented 8 years ago

Evil is an Extensible VI Layer so limiting yourself to not creating states is a bit sad.

I have another concern about the new Hybrid implementation, it is about dynamic switching of editing style. What we win on one hand (remove the need to manage by hand the initial hybrid map) we loose on the other hand. The proliferation of regression and needed guards is due to the recent changes in holy mode and hybrid mode which tend to avoid Evil as much as possible for a reason that is more and more blurry to me (the famous can't we check all the boxes with Evil ?). I'm for reverting these changes and stick with Spacemacs philosophy to embrace Evil mode, it gives nice isolation (minus some setup cost like the hybrid map but this is not big deal) and consistency at multiple levels like the API and the global inner wokring of Spacemacs.

justbur commented 8 years ago

You can toggle hybrid mode off and on. That was never broken. On holy mode a while back I proposed two new versions one of which still used evil, nothing happened for a while and there seemed to be more interest in the current one so I closed the other. It's also a lie to say that there were no bugs before these implementations. There were plenty. That's why I wrote them in the first place.

On Wed, Feb 24, 2016 at 12:04 PM Sylvain Benner notifications@github.com wrote:

Evil is an Extensible VI Layer so limiting yourself to not creating states is a bit sad.

I have another concern about the new Hybrid implementation, it is about dynamic switching of editing style. What we win on one hand (remove the need to manage by hand the initial hybrid map) we loose on the other hand. The proliferation of regression and needed guards is due to the recent changes in holy mode and hybrid mode which tends to avoid Evil as much as possible for a reason that is more and more blurry to me (the famous can't be check all the boxes with Evil ?). I'm for reverting these changes and stick with Spacemacs philosophy to embrace Evil mode, it gives nice isolation (minus some setup cost like the hybrid map but this is not big deal) and consistency at multiple levels like the API and the global inner wokring of Spacemacs.

— Reply to this email directly or view it on GitHub https://github.com/syl20bnr/spacemacs/issues/5211#issuecomment-188355022 .

syl20bnr commented 8 years ago

The current situation is my fault, I did not see the implication of the new implementations, that's fine.

I did not say there were no bugs, actually I said there were some hence the check all the boxes sentence.

That's a good thing we experiment, sometimes it does not work as smoothly as we wanted.

justbur commented 8 years ago

Since evil-disable-insert-state-bindings was merged into evil, I'm perfectly fine using vim style even, so feel free to do whatever you want with hybrid and emacs.

nixmaniack commented 8 years ago

With separation of hybrid and emacs and enhanced version of hybrid, this is solved now.