• You are not logged in.
  • Index
  • Technical
  • <C-[> "control-[" broken in Windows XP and Vista

    <C-[> "control-[" broken in Windows XP and Vista

    • Started by animus144
    • 2 Replies:
    • Reputation: 0
    • From: Berkeley, CA
    • Registered: 26-May-2008
    • Posts: 2

    When using vim and gvim with the Colemak layout enabled in Windows XP and Vista Business 64, control-[ (alternative to escape) doesn't work.  It simply outputs the "[" character when in insert mode. This is annoying since I use this combo as my primary replacement for the out-of-reach escape key.  Control-[   works fine on my linux box with colemak installed.

    Offline
    • 0
    • Shai
    • Administrator
    • Reputation: 36
    • Registered: 11-Dec-2005
    • Posts: 423

    I came across this bug over a year ago. This is a bug with the way that GVim handles that shortcut, the shortcut is recognized correctly by all other applications that I've tested with, e.g. Microsoft Word, Winamp, Foobar2000, Notepad2. Back then, I looked at the source code, and if I recall correctly, there seemed to be layout specific hacks to enable that shortcut under QWERTY. Unfortunately the keyboard handling code of GVim isn't very good under Windows. e.g., you can't map Ctrl-[digit], Ctrl-[symbol], Ctrl-Shift combos, and it treats Ctrl-I and Tab as the same key. Colemak.vim works around the issue by mapping Tab to Escape.

    Offline
    • 0
    • Reputation: 0
    • From: Berkeley, CA
    • Registered: 26-May-2008
    • Posts: 2

    Thanks for the reply, Shai.  I have incorporated the Tab=Esc replacement into my .vimrc, but not the rest of colemak.vim because I want to keep it as near to the defaults as possible (and colemak.vim is getting a bit bulky).  I really like Ryan Heiss's suggestion of using N and E for up and down and S and T for left and right. 

    I have also been using Control-C as a way to exit insert mode.  What are the limitations of using it compared to Escape?  There must be some since <C-c> isn't listed as an alternative to esc like <C-[> is.

    Offline
    • 0
      • Index
      • Technical
      • <C-[> "control-[" broken in Windows XP and Vista