I usually use macvim, and have a number of key bindings using my macs command key. I’m trying to switch over to tmux, but none of those bindings are working. Any tips on how to modify my .tmux.config or .vimrc to get those bindings back?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Do you, by any chance, use
<D->to emulate another editor’s shortcuts?You can use the command key for mappings only in MacVim. There is no Vim-specific workaround.
This is because this key is “intercepted” by Terminal.app (or iTerm.app) for its own use and isn’t even registered by any CLI program. The only modifiers you can rely on in CLI Vim are
ShiftandControl. EvenOptionneeds some workarounds to work and it can’t be achieved without side effects.While you can remap some keys/key-combinations in the preferences of both terminal emulators and/or use third party solutions/hacks to remap the command key I’d advise you to rethink your approach and consider using mappings that make more sense in Vim-world.
My recommendation is to use the
<leader>key as the basis for all your custom mappings. The default<leader>is \ which is quite inconvenient. A lot of people change it to a more convenient key:Here is an example from my
~/.vimrc: