Using ⌥←
from history menu
#454
-
macOS has some nifty text editing shortcuts:
iTerm has a "Natural Text Editing" Key Mapping preset that configures these: In ZSH's hotkey syntax, $ bindkey -M main | grep "\^\[[bf]"
"^[b" backward-word
"^[f" forward-word (I don't understand how the hex codes Often times when I'm in the history menu, I want to press the left arrow key to go in and edit a history item. As of #370, this is possible, and it's wonderful! In addition using the left arrow key to jump a single character left, I want to also be able to use I tried to implement this myself. I thought the trick would be to augment Do you have any idea what might be catching this key event, or how I might be able to figure that out? Monosnap.screencast.2022-07-07.18-54-00.mp4In this clip I first show what |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Another solution approach I've been considering is to add a zstyle config which just removes the I tried to love it and the way that you used it, but it only ever gets in the way for me. In the off chance that I want to compose one history item with another, I would rather opt into that behaviour with an explicit In my local copy, I just ripped out the zsh-autocomplete/functions/completion/_autocomplete.history_lines Lines 119 to 120 in f52f45a - builtin compadd "$expl[@]" -S "$suf" -R _autocomplete.history_lines.suffix \
+ builtin compadd "$expl[@]" -R _autocomplete.history_lines.suffix \
-QU -ld displays -a matches If I were to polish that off (add zstyle config, docs, etc.), would you be interested in having it contributed? |
Beta Was this translation helpful? Give feedback.
-
You’re approaching it the wrong way. Instead of handling possible keystrokes, you should define which keybinding widgets should cause the user to exit the menu, here: Alternatively, install my Zsh Edit plugin and see if that solves the problem for you.
They correspond to |
Beta Was this translation helpful? Give feedback.
You’re approaching it the wrong way. Instead of handling possible keystrokes, you should define which keybinding widgets should cause the user to exit the menu, here:
zsh-autocomplete/functions/widget/.autocomplete.history-search.zle-widget
Line 21 in f52f45a
Alternatively, install my Zsh Edit plugin and see if that solves the problem for you.
They correspond to
^A
and^E
, respectively.