Making iTerm to translate 'meta-key' in the same way as in other OSes

后端 未结 13 1639
轮回少年
轮回少年 2020-12-12 08:42

In bash shell with emacs key-binding, you can use key combination like M-f, M-b to move one word forward or backward on the shell prompt respectively. Usually, the meta key

13条回答
  •  爱一瞬间的悲伤
    2020-12-12 09:17

    Going all zombie resurrection here, but for sake of posterity --

    This post got it working as you desire for me, for M-b and M-f, while keeping 'Option Key as Meta' set so you don't sacrifice a modifier (I have vim mappings using meta, personally).

    In summary, in your Global Keyboard Profile, add two new mappings with settings:

    1. Key as hex code, value of 62 for b, 66 for f (man ascii)
    2. Modifier as Option
    3. Action as send escape sequence, value b or f

    The only thing I still miss from Terminal.app is Opt-Backspace to delete by word. There are other workarounds for that, but I'm just trying to train myself to use Ctrl-w.

提交回复
热议问题