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

Option to keep esc-as-meta in normal mode. #93

Open
ftpd opened this issue Jun 2, 2021 · 0 comments
Open

Option to keep esc-as-meta in normal mode. #93

ftpd opened this issue Jun 2, 2021 · 0 comments

Comments

@ftpd
Copy link

ftpd commented Jun 2, 2021

There are few of us, these weirdos who use esc instead of alt.

Currently vimode blocks that, as Esc in normal mode does nothing. The fix is:

diff --git a/vimode.py b/vimode.py
index 21424fa..50ab1f1 100755
--- a/vimode.py
+++ b/vimode.py
@@ -1407,6 +1407,9 @@ def cb_key_combo_default(data, signal, signal_data):
     global esc_pressed, vi_buffer, cmd_compl_text, cmd_text_orig, \
         cmd_compl_pos, cmd_history_index
 
+    if signal_data.startswith("\x01") and mode == "NORMAL":
+        return weechat.WEECHAT_RC_OK
+
     # If Esc was pressed, strip the Esc part from the pressed keys.
     # Example: user presses Esc followed by i. This is detected as "\x01[i",
     # but we only want to handle "i".

19:53:16 < GermainZ> ftpd: if you want, open an issue on GitHub so I eventually remember to make it an option
19:54:34 < ftpd> GermainZ: Sure I will, thank you.

So, here I am ;-)

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

1 participant