I cannot understand why having this line:

nmap <C-[> :tabprevious<cr>

... causes vim to open up immediately in "c" (change?) mode. This is one half of a pair of mappings that I like to use to do tab navigation in vim:

" screw taglist; yay tabs!
nmap <C-[> :tabprevious<cr>
nmap <C-]> :tabnext<cr>

The latter rule works perfectly fine, but the former gives me this weird behavior when opening vim. After manually going back into normal mode, both mappings work as expected (changing the tabs).

What gives? Am I missing something simple here?

Btw, I'm using CLI vim (i.e., not MacVim) on OSX 10.5 via iTerm2. I've already combed through my entire .vimrc file and installed plugins and confirmed--even with all plugins disabled and all other options commented out--I get this behavior because of the line above.


You definitely do not want to map <C-[> to anything, since it is synonymous with mapping <esc>, which can really mess Vim up for you.

EDIT: Actually, mapping <esc> in normal mode is probably not as big an issue, but it's not a practice I would recommend.

I can reproduce your issue, but unfortunately I cannot figure out why it is happening or how to fix it.

  • Argh, well it is helpful to know that it is synonymous to <esc>, that explains some of it. Stinks though because I really liked using these for my tab navigation... – neezer Feb 3 '12 at 19:49
  • I'm about to report this to the Vim Developer's mailing list as a bug. – Heptite Feb 3 '12 at 20:23

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.