Everyone once in a while in insert mode in Vim, I'd be happily typing along, when all of a sudden I'd be thrown out of insert mode and my last edit undone after hitting a certain key combination.
Today I realized that the mysterious combination was Shift+Enter. Sure enough, hitting Shift+Enter runs undo, regardless of being in insert mode.
I then tried doing Ctrl+V Shift+Enter to see what the literal value of Shift+Enter was, and it printed out:
^[[13;2u
And now it made sense - ^[
is escape, and the u
at the end is undo. The other characters don't do anything when typed in this order.
It appears to be a control code of some kind, but I can't seem to find the right thing to search for to know what this means.
Does anyone know what this control code means, and whether it is possible to disable it in Vim? I'm assuming my terminal might have something to do with it – I'm using Cygwin's stock terminal to ssh into a Linux box and running ssh over that.