The usual behavior in vim is for C-o
in insert-mode to allow the user to use one normal-mode command and then return to insert-mode.
Following the suggestions in this comment, I've set
(vimpulse-imap "\C-o" 'viper-escape-to-vi)
But when I press C-o
in insert-mode, the characters "^O" are inserted in the buffer and I am unable to switch to normal-mode for one command as I expect. I understand viper-escape-to-vi
is bound to C-z
by default but I am also unable to switch to normal-mode using this key combination either ("^Z" is printed in the buffer instead). What am I doing wrong?
Also, second question: I would like for C-z
to not be bound by viper-mode (or vimpulse) as I use it for elscreen. How can I tell it to leave C-z
alone?
Edit: Found this bit of code in vimpulse-misc-keybindings.el:
;; temporarily escape to vi state
(define-key viper-insert-basic-map "\C-o" 'viper-escape-to-vi)
So should be defined already? Not sure why it doesn't work.