-
Notifications
You must be signed in to change notification settings - Fork 16
MagitPopup without evil bindings #8
Comments
The magit popup is mostly TAB and RET, no? |
Well, I like everything to have evil mode. For example while within MagitPopup, I can use evil bindings to scroll up and down to see options that I couldn't see otherwise because the screen is too small. Once I'm in it, then, I can use all of evil bindings to easily switch windows, close this window, and all the other stuff my personalized evil can do. But the solution above works great, so maybe we don't need to change anything. |
I wasn't sure there was much value to doing something more with the pop ups
|
Great thank you. I don't actually have any suggestions. |
I can do C-bfud for scrolling that shouldn't be a problem. hjkl is a problem because it would mask the magit functions, unless you went to modal editing which I think would be weird in a popup |
Yup, I'm using modal editing. I have to press i for insert mode then press the key, but it's worth it for me for the power and flexibility of being able to use all my evil bindings like switching windows or closing the current window. Not everyone would appreciate that though, so the current implementation would be better than modal-editing for the mass. Actually, I think the best would be normal-mode (or whatever you want to call it that is just one mode where all my evil bindings work) with shift-key or ctrl-key for the option. This is different than how it currently stands which is just key for the option (e.g. d for --dwim.) This probably wouldn't work out-of-the-box for most configurations that depend on ctrl (or shift.) However, semicolon key might work? The only compromise is if there's some way to configure-it. |
We could try a leader key approach. Hit the leader key then the option. The magit popups are a little odd in how they implement key bindings though and I haven't completely dug into them yet. |
That would be really cool. |
Try this: (dolist (char (number-sequence ?! ?z))
(evil-define-key 'normal magit-popup-mode-map
(concat ";" (char-to-string char)) 'magit-invoke-popup-action)) Be careful though. I'm not positive this will work everywhere, but it allows for |
Thanks, I gave it a try. It doesn't work for the switches and options, unless I'm doing something wrong. Anyways, ";" as a leader, for me, isn't much better than going into insert mode first. Ctrl or shift might be better (hold ctrl then click option, for example), but it's probably not worth it. Thank you for giving this attention, but I'm going to close it because it's not worth anymore. I'm satisfied with changing the default initial state and using insert mode. |
I had to set
In general.el. it would be nice to be able to use emacs-state keybindings for magit-popup-mode in normal-state, but I guess that would cause a lot of overlapping. |
As above, MagitPopup (or magit-popup-mode) doesn't have evil bindings yet. However, this works instead so far:
Thanks!
The text was updated successfully, but these errors were encountered: