-
Notifications
You must be signed in to change notification settings - Fork 12
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
Mode? How to best integrate evil-lion with evil and not lose flexibility #8
Comments
Glad you like it! I had the same reaction when I first discovered vim-lion. Regarding the mode - at this point, I've spent (at least) twice as much time on figuring out how to package this functionality for evil versus time I've spent developing it. Different people use evil differently - some use it for prog/text modes only, some use it everywhere, some use emacs-state instead of insert-state. Looking at different packages, I don't see a single convention that evil-lion can follow:
Trying to package evil-lion as a mode has its quirks as well - now it's a global minor mode, but doesn't have a local mode companion (as a result you can't enable the local mode in a My goals seem so simple (to me at least), yet I haven't found a way to cover them all in a clean fashion:
In other words, I'm more than open for suggestions. |
Hi, please allow me to chime in. at it's core, evil-lion is composed of just 2 commands. to use evil-lion, the user just have to bind those commands to convenient keybindings. So turning off evil-lion should be just a matter of unbinding those keys. the minor mode does just that: binds and unbinds the default keybindings. I find this simple and effective enough. "just works". |
Yes, it's easy but not having to think about switching evil-lion on would be even easier. |
Yes, it's easy to switch on evil-lion-mode but it's not "just works" easy. That would be if the user didn't have to bother at all about activating evil-lion. Anyway, it's not a big deal and I see now that this issue may be a bit more complex than I appreciated. Probably best to stick with the current approach. |
Here's yet another way you can bind the 2 commands with the added benefit of autoloading evil-lion on first use: (use-package evil-lion
:ensure t
:bind (:map evil-normal-state-map
("g l " . evil-lion-left)
("g L " . evil-lion-right)
:map evil-visual-state-map
("g l " . evil-lion-left)
("g L " . evil-lion-right)) I believe this could be made even shorter with general.el With this approach you never have to enable the minor mode. But it has the drawback of being active in non prog-mode buffers like magit. I'll leave this issue open for a bit, just in case someone comes up with some other option. |
This is such a great feature. One of those things that you've always missed without knowing it. One question, though: Does it make sense that this has it's own mode? I would guess that users want this when evil mode is on but not otherwise. Making this its own mode means that it can be switched on with evil off and the reverse. Not sure if there are any use cases for these combinations.
The text was updated successfully, but these errors were encountered: