-
Notifications
You must be signed in to change notification settings - Fork 135
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
Add eat-eshell shim #666
Add eat-eshell shim #666
Conversation
Hey, thanks for the PR. Why don't we use char mode instead of semi-char mode. The char mode supports all terminal keys which seems to be better as we already have normal state with emacs mode. I have a setup like this
|
Good point about using char mode instead. The reason is mainly that it defaults to semi char mode. That advice you have there, is that to get into eat-emacs-mode? To solve the pasting from normal mode; can I wrap meow-yank in semi-char-mode then override it in the keymap only for eat-eshell in any convenient way? |
Yeah, I have this advice to get to Add a hook to |
I don't think it's a great idea to override keys in Is there something we can do here with your work with lowering the priority of the keymap? This should allow us to have a shim minor mode that grabs certain keys from normal mode. |
Okay, I think what I said was wrong. Well, the situations in eat and eat-eshell are different. In eat-eshell, it's quite simple, we don't need to rebind anything. But in eat, when the |
I've updated with changes so that i runs in char mode. I also changed it so that it doesn't rely on some internal variable for keeping track of state. It is a bit nicer to use as I no longer need to go into char-mode for handling things like f-keys in htop and the like (which is mostly what I use it for. The only thing I don't really know how to handle is how we should send escape. I don't really do that very often outside of running vim in emacs to show that you can, but maybe it would be good to have the alternative. You could always press "C-[ C-[" to send escape. |
eat-eshell is a mode for eat integration for eshell. This lets you run visual commands directly in eshell instead of having it open it in a separate term buffer.
After a visual command has completed and it returns to eshell it doesn't update the cursor so we should do that on the exit-hook.
As it goes from eshell which is effectively running in line-mode, to eat in semi-char-mode, the experience can be a bit jarring. In semi-char-mode you can't really move around. Moving up and down would instead cycle through the command history. By toggling emacs-mode on entering normal mode makes this experience nicer, though as the some work would be needed to make pasting from normal mode working.
I'm not thrilled about relying on
eat--eshell-semi-char-mode
, maybe this is fragile? This was the only way I could come up with to track which mode we are in.The rest of eat could probably use a similar shim, but I don't really use the rest so it might be better for someone who do to implement it.