I've been trying to chase down a new issue that has cropped up for me while using Vim. This issue is only present when I run vim within iTerm2 beta, and not present within the native terminal app or iTerm2 3.3.12. Therefore, I suspect it's a strange issue with iTerm2 beta.
iTerm2 Build 3.4.0beta5
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Sep 6 2020 02:21:34)
OSX 10.14.6
In vim, it seems that some of my keybindings fail after a system bell is played. Specifically, it seems as if when a bell is played while I'm holding the ctrl key, my ctrl key bindings fail until I restart vim.
I pared down my .vimrc file to just:
noremap <C-K> <C-W><C-K>
noremap <C-J> <C-W><C-J>
noremap <C-H> <C-W><C-H>
noremap <C-L> <C-W><C-L>
If I start vim, then create a split (:vsp) I can navigate left and right by using ctrl-L and ctrl-H as expected. However, if I press an illegal key combination that generates a system bell (ctrl-; or ctrl-.) the ctrl-L and ctrl-H stop working (along with any other mapped ctrl key combination). However, the default vim ctrl-W command still works.
This seems quite a bit like a vim issue, but I can only reproduce it while using iTerm2 beta. I had not installed the shell integration and added it to see if there would be any change, but it made no difference. Downgrading to iTerm2 3.3.12 makes the problem go away.
Thanks for making a fantastic product! Let me know if I can help narrow this down further.
Ian.