Skip to content
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

Missing Commentary on meow-esc.el in Docstring #510

Closed
jgarte opened this issue Sep 23, 2023 · 5 comments
Closed

Missing Commentary on meow-esc.el in Docstring #510

jgarte opened this issue Sep 23, 2023 · 5 comments

Comments

@jgarte
Copy link
Contributor

jgarte commented Sep 23, 2023

https://github.com/meow-edit/meow/blob/master/meow-esc.el#L16

Could we add a comment there?

I'm not sure what to put.

@DogLooksGood
Copy link
Collaborator

DogLooksGood commented Sep 24, 2023

These codes are copied from evil to make esc work in terminal. :)

@jgarte
Copy link
Contributor Author

jgarte commented Sep 24, 2023

What should we write for the module docstring short explanation?

@DogLooksGood
Copy link
Collaborator

This module is used to patch the behavior of ESC key in terminal.

@jgarte
Copy link
Contributor Author

jgarte commented Sep 24, 2023

Why was the patching required?

Just curious to understand the historical reason for it needing to exist.

@eshrh
Copy link
Member

eshrh commented Oct 3, 2023

It's because meta combos in the terminal send the exact same keycode as pressing ESC and then the key, which is why you can use ESC as meta in the terminal. This is problematic for evil and meow because esc is used while coding more frequently, if you press escape and then a key usually you don't want the meta combo. meow-esc-delay is the maximum time between ESC and the keypress that should be treated as a meta combo. If the time is longer than the delay, it's treated as pressing ESC and then the key separately

@ghost ghost mentioned this issue Oct 5, 2023
eshrh added a commit that referenced this issue Oct 5, 2023
Refactor the "fake" meow-esc-mode with the minor mode macro.
Add commentary as suggested in #510.
@eshrh eshrh closed this as completed Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants