I often Ctrl-Z to the command line. Is there a way to do that in response to hitting Ctrl-Z in insert mode?

The iabbrev command does not seem to work.

  • 1
    How does this work for you: inoremap <c-z> <esc>:stop<cr> ? Or inoremap <c-z> <esc><c-z> See :h CTRL-Z
    – VanLaser
    Jan 15 '16 at 17:14
  • Works great. Please make this into an answer
    – Yossi Gil
    Jan 15 '16 at 19:17

Using :h CTRL-Z as inspiration, the following solutions can be cooked:

:inoremap <c-z> <esc>:stop<cr>

or (shorter & literally closer):

:inoremap <c-z> <esc><c-z>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.