Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use nnoremap ; : to go to command mode. Is there oposite shortcut that i can add to my .vimrc so that i won't press ESC every time to go back to normal mode?

share|improve this question
up vote 1 down vote accepted

Aborting command-line mode shouldn't be so frequent, why do you worry about having to press Esc?!

Some people remap Caps Lock to either Esc or Ctrl (outside of Vim), this also helps with leaving insert mode. Did you know that you can also use Ctrl-C to abort the command-line? Alternatively, you can define a mapping, e.g. ;; to abort the command-line:

:cnoremap ;; <C-c>
share|improve this answer

Choose some easy-to-type key sequence that you aren't likely to use in any text and map it to <Esc>. The sequence qq is not found in English, for example, so you could map it like this:

inoremap qq <Esc>

If you ever have a need to enter that sequence into some file, just precede it with Ctrl-V.

share|improve this answer
He wants to leave the command line, not insert mode, but the mapping is almost identical: :cnoremap. – Ingo Karkat Dec 22 '12 at 2:01
@Ingo Karkat: OK, thanks. I never leave command mode except when finishing the command, so despite his words, I assumed he meant to leave insert mode. – garyjohn Dec 22 '12 at 5:09
Although not relevant answer, you helped me fix my problem with remaping Esc to something more reachable :) – Ratul Jul 19 '15 at 20:47

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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