1

How can I input commands such as <Ctrl-W> and <Ctrl-]> in vim using Cmd instead of Ctrl? The reason why I want to do it is because it's more comfortable. When I need to switch to a different split, for example, it's way more cumbersome to place my fingers on Ctrl than on Cmd. I'm sure many of you have also met with this problem, but I can't seem to find any resolutions online, other than "just use Ctrl".

  • Suggest you broaden your question to "How can I remap the command key to Control key in OS X?" to broaden it, will cover many more cases and future searches. – gosmond Feb 23 '13 at 23:35
  • @gosmond Disagree. I have KeyRemap4Macbook and re-mapped cmd to ctl. However that remapping does not get respected in either vi, vim or macvim. Therefore this question is completely appropriate to be specific for vim. – javadba May 23 '15 at 6:53
1

There is an app called Keymando that I think can do this. Not sure if you can specify to do it only in Vim but you can specify to remap CTRL to CMD in Terminal.

When you've installed Keymando, put this in your config

only /Terminal/ do
    map "<Ctrl>", "<Cmd>"
end
  • The link is broken – Elazar Jul 4 '18 at 5:32
0

The application "KeyReMap4MacBook" should do what you want.

Additional suggestions via other methods:

https://askubuntu.com/questions/42907/how-do-i-remap-command-key-to-be-the-control-key-on-a-macbook-4-1

https://superuser.com/questions/263647/how-would-i-remap-mac-cmd-to-ctrl-keys-in-remote-desktop-connection-for-mac-appl

  • I am using KeyRemap4MacBook and the command-ctrl swapping works for most apps- but not for vi/vim/macvim. – javadba May 23 '15 at 7:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .