0

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.

1 Answer 1

0

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.

2
  • 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, 2012 at 19:49
  • I'm about to report this to the Vim Developer's mailing list as a bug.
    – Heptite
    Feb 3, 2012 at 20:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .