This question already has an answer here:

I have the same vimrc file for both Windows and Ubuntu environments. It works fine on both platforms, except for one difference. The line:

nmap <C-[> <C-t>

is working fine on Windows, but on Ubuntu (14.04.2 64 bit) as soon as vim loads it puts me into replace mode and says "at bottom of tag stack", as if it's running the command immediately instead of just performing the mapping. I have other nmap lines before/after this one which don't cause any problems.

I'm on the latest vim on both platforms; on Ubuntu I'm using vim-gnome(huge build).

marked as duplicate by Martin Tournoij Jul 20 '15 at 14:39

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 2
    This Ingo's answer might be relevant and not really a good news for you. – statox Jul 10 '15 at 9:43
  • 4
    <C-[> is the same as <ESC> on UNIX. Just choose another key combination. – lcd047 Jul 10 '15 at 10:04
  • I wouldn't say this is a duplicate as I was not aware I was tampering with the definition of escape and don't wish to change it. Essentially my question has two parts; the inability to map the key, which I know understand, and why it dumps me into replace mode. – user859 Jul 11 '15 at 13:59
  • The <Esc> or <C-]> sequence is called during startup, for sending information to the terminal. Remapping <C-[> is something that should be an error when running in a terminal, IMHO. – Martin Tournoij Jul 20 '15 at 14:45