Sometimes I forget that I am in ViM, and I press C-s C-x, which is Save and Exit in Emacs.
This had the effect in ViM, that it writes ^X and freezes.
Does anyone know how to either undo or return to ViM in such a situation, so I can save the changes?
C-s sends a stop signal to your terminal, if not configured differently. To “unstop”, use C-q.See this entry in the novice bash tips manual.