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

Re: Control-

Expand Messages
  • Gary Johnson
    ... That would explain this from the original post, too: In gvim, when at vim s command line, I can do c- and c- to move the cursor to the
    Message 1 of 9 , Feb 1, 2010
    • 0 Attachment
      On 2010-01-31, Benjamin R. Haskell wrote:

      > There was a similar thread recently on the Zsh list about the 'Home' and
      > 'End' keys. If I'm not mistaken, Vim puts terminals into 'application'
      > mode, where, in mlterm, the sequences are:
      >
      > (bare) (Ctrl+)
      > Up ^[OA ^[O1;5A
      > Down ^[OB ^[O1;5B
      > Right ^[OC ^[O1;5C
      > Left ^[OD ^[O1;5D
      > O = capital o, not zero

      That would explain this from the original post, too:

      In gvim, when at vim's command line, I can do c-<left> and
      c-<right> to move the cursor to the previous/next word boundary.
      In normal vim, I cannot do this. It tries to enter the control
      code text "1;5D" into the document instead (and I lose the
      command that I was composing).

      which I couldn't reconcile with the escape sequences I was seeing.

      Regards,
      Gary


      --
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
    • Paul
      ... Yes, sorry. ... Yay! I tried Gary s ctrl-v suggestion and it put ^[O1;5D in the buffer, but it didn t work until I tried the above - cmap without the [
      Message 2 of 9 , Feb 6, 2010
      • 0 Attachment
        On Sun, Jan 31, 2010 at 01:33:16PM -0500, Benjamin R. Haskell wrote:
        >> > I'm using mlterm, but XTERM is set to 'xterm'. When I set it to
        >> > 'mlterm', I get the same behaviour. It works when I run vim from
        >> > xterm, though, both when TERM is 'xterm' and 'mlterm'.
        >>
        >> I assume that "XTERM" is a typo and that you meant "TERM".

        Yes, sorry.

        >The upshot is that the Vim mappings the OP is looking for are:
        >
        >:cmap <Esc>O1;5A <C-Up>
        >:cmap <Esc>O1;5B <C-Down>
        >:cmap <Esc>O1;5C <C-Right>
        >:cmap <Esc>O1;5D <C-Left>

        Yay! I tried Gary's ctrl-v suggestion and it put ^[O1;5D in the buffer, but it didn't work until I tried the above - cmap without the [ character!

        >It may or may not matter, but I was using the correct TERM value
        >(TERM=mlterm).

        It doesn't matter.

        Thanks, guys!


        --

        .

        --
        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.