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

fix #59 #63

Merged
merged 2 commits into from
Jul 4, 2024
Merged

fix #59 #63

merged 2 commits into from
Jul 4, 2024

Conversation

slingamn
Copy link
Member

@slingamn slingamn commented Jul 1, 2024

Enable "next word" and "previous word" in many terminals:

  • Alt-LeftArrow and Alt-RightArrow in xterm and iTerm2 with default settings, where they translate to \x1b\x1b[D and \x1b\x1b[C respectively
  • Alt-LeftArrow and Alt-RightArrow in iTerm2 in "Natural text editing mode", where they translate to \x1bb and \x1bf
  • Alt-b and Alt-f in xterm, where they translate to \x1bb and \x1bf

Enable "next word" and "previous word" in many terminals:

* Alt-LeftArrow and Alt-RightArrow in xterm and iTerm2 with default settings,
  where they translate to \x1b\x1b[D and \x1b\x1b[C respectively
* Alt-LeftArrow and Alt-RightArrow in iTerm2 in "Natural text editing mode",
  where they translate to \x1bb and \x1bf
* Alt-b and Alt-f in xterm, where they translate to \x1bb and \x1bf
@slingamn
Copy link
Member Author

slingamn commented Jul 1, 2024

cc @wader , I think this is a general, production-ready fix

@wader
Copy link
Collaborator

wader commented Jul 1, 2024

Played around a bit with it in iterm2 and terminal.app both with readline demos and fq and it seems to work 👍

@slingamn
Copy link
Member Author

slingamn commented Jul 2, 2024

Doesn't work in lxterminal, where Alt-LeftArrow and Alt-RightArrow produce \x1b[1;3D and \x1b[1;3C respectively (???)

@slingamn
Copy link
Member Author

slingamn commented Jul 4, 2024

The latest patch should fix it in the libvte-based terminals (Gnome Terminal and lxterminal) as well as Windows.

@slingamn
Copy link
Member Author

slingamn commented Jul 4, 2024

Also works in foot

@slingamn slingamn merged commit 621a5c5 into master Jul 4, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

2 participants