iTerm 2: How to set keyboard shortcuts to jump to beginning/end of line?

后端 未结 14 1800
难免孤独
难免孤独 2020-12-02 03:09

I can see that Ctrl+left/right jumps to the beginning/end of line. How to change this to Cmd+left/right arrow

14条回答
  •  自闭症患者
    2020-12-02 03:40

    The old fashion emacs bindings can still work in iterm2 and os x terminal:

    Preferences -> Profiles -> Keys (sub tab in profiles)

    • Set Left/Right option key acts as +Esc (similar in os x terminal)

    This should enable alt-f and alt-b for moving words by words. (Still ctrl-a and ctrl-e always work as usual)

    If set as meta those old bindings will work while some iterm2 bindings unavailable.

提交回复
热议问题