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

imapping causes problems with arrows.

Expand Messages
  • Eric Smith
    ... or ... That works fine, but as a side effect makes the arrows , and friends trigger this mapping which is not desired. How do i fix this? --
    Message 1 of 4 , Jul 2, 2001
    • 0 Attachment
      I reallly like saving my files all the time, so I use:
      :imap <Esc> <Esc>:up<CR>
      or
      :ino ...

      That works fine, but as a side effect makes the arrows
      <Right>, <Down> and friends trigger this mapping which is not desired.

      How do i fix this?

      --
      Eric Smith
    • Benji Fisher
      ... I do not see this, but I imagine that your cursor keys send key sequences that start with . What OS are you using? Perhaps some of these pointers
      Message 2 of 4 , Jul 2, 2001
      • 0 Attachment
        Eric Smith wrote:
        >
        > I reallly like saving my files all the time, so I use:
        > :imap <Esc> <Esc>:up<CR>
        > or
        > :ino ...
        >
        > That works fine, but as a side effect makes the arrows
        > <Right>, <Down> and friends trigger this mapping which is not desired.
        >
        > How do i fix this?

        I do not see this, but I imagine that your cursor keys send key sequences
        that start with <Esc>. What OS are you using? Perhaps some of these pointers
        will help:

        :help 'esckeys'
        :help 'timeout'
        :help xterm-cursor-keys

        HTH --Benji Fisher
      • Eric Smith
        ... thank you Benji I studied all those section you refer to, and I tried various options and timeoutlen etc but all to no avail :( The arrow keys still
        Message 3 of 4 , Jul 2, 2001
        • 0 Attachment
          According to Benji Fisher on Mon, Jul 02, 2001 at 02:14:57PM -0400:
          | I do not see this, but I imagine that your cursor keys send key sequences
          | that start with <Esc>. What OS are you using? Perhaps some of these pointers
          | will help:
          |
          | :help 'esckeys'
          | :help 'timeout'
          | :help xterm-cursor-keys

          thank you Benji

          I studied all those section you refer to, and I tried various options
          and timeoutlen etc but all to no avail :(
          The arrow keys still trigger the <Esc> mapping.
          My arrow keys up,down,left and right produce ^[[A^[[B^[[C^[[D

          Before my original posting I tried imapping the arrow keys to
          just do the movement without the <esc> but failed - is this approach
          not workable?

          I do not see that
          :se esckeys or
          :se notimeout are solutins

          thanx

          --
          Eric Smith
        • Benji Fisher
          ... I assume that ^[ (looks like two characters in the e-mail) is a CTRL-[, which is the same as . My system (gvim on W95) does not have this problem,
          Message 4 of 4 , Jul 2, 2001
          • 0 Attachment
            Eric Smith wrote:
            >
            > According to Benji Fisher on Mon, Jul 02, 2001 at 02:14:57PM -0400:
            > | I do not see this, but I imagine that your cursor keys send key sequences
            > | that start with <Esc>. What OS are you using? Perhaps some of these pointers
            > | will help:
            > |
            > | :help 'esckeys'
            > | :help 'timeout'
            > | :help xterm-cursor-keys
            >
            > thank you Benji
            >
            > I studied all those section you refer to, and I tried various options
            > and timeoutlen etc but all to no avail :(
            > The arrow keys still trigger the <Esc> mapping.
            > My arrow keys up,down,left and right produce ^[[A^[[B^[[C^[[D
            ----

            I assume that "^[" (looks like two characters in the e-mail) is a CTRL-[,
            which is the same as <Esc>. My system (gvim on W95) does not have this
            problem, so I cannot experiment. Just for fun, I would try

            :set notimeout nottimeout

            and then try typing <Esc>[A to see if I got the effect of a cursor key. At
            least, that might confirm the diagnosis. It may not help, because it might
            count as an ambiguous mapping, but did you try a small value, like

            :set timeoutlen=10

            for example?

            --Benji Fisher
          Your message has been successfully submitted and would be delivered to recipients shortly.