Unfortunately, there's no reliable way of mapping Ctrl-=.
Because of the way that ctrl+key
chords interact with the terminal and are represented internally, the only Ctrl-mappings that Vim is guaranteed to be able to detect are the ones defined in the ASCII standard. Here is the full list of such ctrl+key
combinations, and the byte each represents.
Ctrl-@ 0x00 NUL
Ctrl-A to Ctrl-Z 0x01 to 0x1A
Ctrl-a to Ctrl-z 0x01 to 0x1A
Ctrl-[ 0x1B ESC
Ctrl-\ 0x1C
Ctrl-] 0x1D
Ctrl-^ 0x1E
Ctrl-_ 0x1F
Ctrl-? 0x7F DEL
However, note that most of these are already have a function in Vim, and some are essentially identical to/indistinguishable from other keystrokes. e.g. CTRL-M
has the same keycode as Enter
, so if you map either of those you are also unavoidably mapping the other.
Source: Vim-FAQ
You might be able to get around the restrictions above by configuring your terminal to send a certain byte-sequence for your mapping, like in this stack-overflow thread, but that will definitely be a pain. Personally, I'd rather just pick a different mapping.
This might eventually be fixed, but it's unlikely, since Vim relies upon the terminal it's running in. However, there's a good possibility this will work in Neovim. I don't know if that works right now or not.
modifyOtherKeys
; key bindings - Disable <Esc> but keep <C-[> - Vi and Vim Stack Exchange ■ key bindings - How to map Alt key? - Vi and Vim Stack Exchange