-
Notifications
You must be signed in to change notification settings - Fork 340
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
Move cursor one word left or right #63
Comments
It is possible by adding custom keybinds via OptionAddKeyBind. But go-prompt needs to define By the way, the answer of stackoverflow says:
But in my environment(macOS Sierra and iTerm2):
Is this behavior different with OSX? |
the answer of stackoverflow says is to set such key, not the real key. |
i make a pr , and add the follow code in my project to move cursor one word left or right prompt.OptionAddASCIICodeBind(prompt.ASCIICodeBind{
ASCIICode: []byte{0x1b, 0x62},
Fn: prompt.GoLeftWord,
}),
prompt.OptionAddASCIICodeBind(prompt.ASCIICodeBind{
ASCIICode: []byte{0x1b, 0x66},
Fn: prompt.GoRightWord,
}), |
Thank you @chyroc this is super helpful for |
Suggestions
Please write your suggestion here and removed "Bug reports section".
in : https://stackoverflow.com/questions/6205157/iterm-2-how-to-set-keyboard-shortcuts-to-jump-to-beginning-end-of-line
i can change iTerm2 setting:
0x1b 0x62
to Move cursor one word left0x1b 0x66
to Move cursor one word righthow can i do this same with go-prompt
Operating System:
osx
Terminal Emulator:
iTerm2
tag of go-prompt or commit revision:
master
The text was updated successfully, but these errors were encountered: