Loading ...
Sorry, an error occurred while loading the content.

Re: control up/down/left/right doing weird things

Expand Messages
  • Robert Mark Bram
    ... OK, don t ask me why it works, but based on a previous post on the same issue, I tried some experimentation and solved it. Based on an earlier post on a
    Message 1 of 5 , Aug 3, 2009
    • 0 Attachment
      > I have NO mappings in my .vimrc for C-UP, C-DOWN, C-LEFT or C-RIGHT..
      > yet:
      >
      > C-UP puts "A" on a new line
      > C-DOWN puts "B" on a new line
      > C-RIGHT puts "C" on a new line
      > C-LEFT puts "D" on a new line

      OK, don't ask me why it works, but based on a previous post on the
      same issue, I tried some experimentation and solved it.

      Based on an earlier post on a similar issue, here is some more
      information related to this.

      In insert mode, I press control-V, control-left/right/up/down. The
      result:

      control left: ^[OD
      control right: ^[[C
      control up: ^[[A
      control down: ^[[B

      I already has this in my .bash_profile:
      stty -ixon

      So then I tried putting this in my .vimrc:
      set <c-left>=^[OD
      set <c-right>=^[OC

      After that, control+left and right works now!

      But this caused an error:
      set <c-up>=^[OA
      set <c-down>=^[OB

      So.. I got what I wanted.. now to fix ALT keys..

      Rob
      :)
      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Robert Mark Bram
      ... where you get the ^[ by typing CTRL-V --~--~---------~--~----~------------~-------~--~----~ You received this message from the vim_use maillist. For
      Message 2 of 5 , Aug 3, 2009
      • 0 Attachment
        > So then I tried putting this in my .vimrc:
        > set <c-left>=^[OD
        > set <c-right>=^[OC

        where you get the "^[" by typing CTRL-V
        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • Robert Mark Bram
        Thanks John! ... I will read these pages anyway since I have a feeling these are related to ALT key mappings too. Rob ...
        Message 3 of 5 , Aug 3, 2009
        • 0 Attachment
          Thanks John!

          > > I have NO mappings in my .vimrc for C-UP, C-DOWN, C-LEFT or
          > > C-RIGHT.. yet:
          >
          > > C-UP  puts "A" on a new line
          > > C-DOWN   puts "B" on a new line
          > > C-RIGHT   puts "C" on a new line
          > > C-LEFT   puts "D" on a new line
          >
          > Your system is sending escape sequences that Vim is not
          > configured to interpret. See if any of the following info
          > is relevant:
          >
          > http://vim.wikia.com/wiki/Fix_arrow_keys_that_display_A_B_C_D_on_remo...http://vim.wikia.com/wiki/PuTTY_numeric_keypad_mappings

          I will read these pages anyway since I have a feeling these are
          related to ALT key mappings too.

          Rob
          :)
          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_use" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        Your message has been successfully submitted and would be delivered to recipients shortly.