Keyboard shortcuts in Vim require shift key to work
Hello!
I'm trying to track down an issue with keybindings in Vim. Recently I updated some software at home, and brought my config over from my work machine. Although the mappings haven't changed, I must now add the shift key to trigger them. I've managed to boil this down to the following test case:
- Start vim with
vim --clean
. - Define a mapping:
:nnoremap <special> <C-e> :e #<CR>
("switch to the alternate file"). - Press Ctrl-e.
- This should display an error ("E194: No alternate file name to substitute for '#'."). It does not.
- Pressing Ctrl-shift-e displays the expected message.
- Natively, Vim uses Ctrl-e to scroll the buffer. If you add some lines of text before pressing Ctrl-e in normal mode, it'll scroll.
- I've tried toggling Session → Terminal State → Report modifiers with CSI u, but that doesn't seem to change things.
This happens for me with iTerm2 but not in Apple's terminal, which leads me to wonder if it's something in my iTerm2 setup. (In the Apple terminal, Ctrl-e fires the mapping as expected). I previously thought this was a Vim bug, so there's some more details and speculation in Vim's bug tracker. My work machine doesn't have this problem; I'm using iTerm2 3.3.7beta1 on that machine, which suggests an iTerm version floor if this is a bug.
Any thoughts about what settings might cause this would be appreciated! Thank you for all your work on iTerm2, it's a great program.
- iTerm2 version: 3.4.0beta4
- OS version: macOS Mojave (10.14.6)
- com.googlecode.iterm2.plist