-
Notifications
You must be signed in to change notification settings - Fork 6
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-left / alt-left should skip between words #59
Comments
Sorry i was confused about keys, it't not cmd+left/right, it's alt+left/right. For me it stopped working after 727da2a, maybe we're testing differently? i'm using iterm2 on macOS. Maps quite well to what was removed here 727da2a#diff-8b7f25bac2ae04c2ce2abb628c6aa28103fd113103a62f3e9d232fa995684915L174 got lost in the refactor somehow? |
Hmm, that makes sense. I was testing on Linux, not MacOS --- I'll try it in iterm2 when I get a chance. (Alt-Left and Alt-Right work for me with GNU Readline in the same Linux terminal, e.g. with the CPython REPL, but they do not work with v0.0.1.) |
Tried hackily to add this in consumeANSIEscape
seems to work but i'm a bit unsure how to refactor/restructure things to do it in a sane way |
Just clarifying, the sequence is the ANSI escape |
Yeap i think so |
Got annoyed with this again today 😬 any suggestion how to fix? my change felt a bit too hacky |
Sorry about the delay. Your implementation strategy looks fine to me :-) I pushed a version of it here: It did not work for me in iTerm2 3.5.2 with default settings. Here are the keybindings I see with default settings: According to this, option-right would actually send I implemented a hack to read sequences of this form and it works for me in iTerm2 and also on Linux with urxvt, although I haven't tested other Linux terminals yet. What I would really like is some documentation about these sequences and also more clarity about sequences that start with a double |
I found a project dealing with a similar issue, although it didn't clarify things to my satisfaction: c-bata/go-prompt#63 (comment) |
It looks like the "Natural text editing" presets in iTerm2 enable the short sequences |
GNU Readline also accepts Alt-b and Alt-f for this, apparently. |
Alt-b and Alt-f in xterm/urxvt produce |
Someone told me that in general with xterm, combining alt with a key will produce an additional |
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
Sorry for delay also, out traveling a bit. Think i'm using "Natural text editing" with iterm2 also. Nice research and it sounds like you have figure out how to make |
🥳 planning a new release soonish? |
Yeah I tagged this as |
rc1 seems to work fine and all tests pass, but the readline-parts are not exercised much |
Nice, I felt pretty confident so I went ahead and tagged |
As discussed here: wader/fq#940 this is a normal readline feature. I checked our v0.0.1 (last upstream release) and it does not work there, so it's not a regression, it was never implemented.
The text was updated successfully, but these errors were encountered: