iTerm 2 not honoring key bindings declared in .tmux.conf

感情迁移 提交于 2019-12-08 17:06:52

问题


I am using the latest stable version of iTerm2 (2.0) with the latest Homebrew build of tmux (1.9a). Unfortunately, my keybindings as declared in .tmux.conf do not work with the iTerm2/tmux combo in "integrated mode" (i.e. when iTerm2 takes over the management of tmux windows and panes). I tried different prefixes (C-b, M-a) as well as different key mappings in iTerm, but to no avail.

Is this indeed an iTerm bug? Or is my expectation that the .tmux.conf keybindings would be carried over to iTerm a false one? Even my tmux command prefix (M-a) does not work!

You may view my tmux configuration file at https://gist.github.com/453ab63c42df976bc2be.


回答1:


Someone reported a similar bug at iTerm2 Tmux Integration Default Keybindings not working in 2015. The response from the developer George Nachman suggests that keybindings are not supported:

One of the main goals of the tmux integration is that you use iTerm2's keystrokes, not tmux's. If there's a specific workflow that you can't accomplish natively, let me know--there is a lot of power in the ability to remap keys in iTerm2.




回答2:


edit: Ben's answer that this is unsupported is correct. My advice does not apply to "integrated mode".

Make sure you don't have conflicting key mappings in iTerm, that your option key is set to Meta, and that you've tmux source ~/.tmux.conf after your changes (the config is only loaded by the server, so you have to restart all sessions or re-source). Also, if you're using Karabiner or another hotkey remapper, it could be interfering in some way.

You're starting with a rather extensive config - I'd start with a one line config for testing purposes.



来源:https://stackoverflow.com/questions/26063195/iterm-2-not-honoring-key-bindings-declared-in-tmux-conf

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!