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

Re: does not work (was: vim question)

Expand Messages
  • Gerald Lai
    ... [snip] Sorry, I forgot to include one detail that was ttimeoutlen . The advantage of encapsulating the keycode in like: set timeout
    Message 1 of 34 , Mar 5 1:08 PM
    • 0 Attachment
      On Sun, 5 Mar 2006, Luis A. Florit wrote:

      > * El 05/03/06 a las 17:39, Luis A. Florit chamullaba:
      >
      >>>> nmap OA <Up>
      >>>>
      >>>> that works fine, EXCEPT because now the O command in normal
      >>>> mode waits for a second for a 2nd key, as you said...
      >>>> So, I had to make another setting:
      >>>>
      >>>> set timeout timeoutlen=1000 ttimeoutlen=100
      >>>>
      >>>> for the O to not wait that long (1/10 sec).
      >>>
      >>> A correction:
      >>> set timeout timeoutlen=1000 ttimeoutlen=100
      >>> works fine if, instead of :nmap OA <Up>
      >>> we make
      >>>
      >>> set <xF2>=OA
      >>> nmap <xF2> <Up>
      [snip]

      Sorry, I forgot to include one detail that was 'ttimeoutlen'. The
      advantage of "encapsulating" the keycode in <xFn> like:

      set timeout timeoutlen=1000 ttimeoutlen=100
      set <xF2>=^[[a
      map <xF2> <S-Up>

      as opposed to only:

      map <Esc>[a <S-Up>

      is that <xF2> can be treated as a keycode of a single keystroke (within
      a mapping context) as opposed to a mapping of multiple keystrokes.

      Then setting 'ttimeoutlen' to a really small value ensures that the
      keycodes cannot (be humanly-possible but shell-possible to) be entered
      manually.

      Hope I'm making sense :)
      --
      Gerald
    • Luis A. Florit
      ... Yep, now you do. ;) L.
      Message 34 of 34 , Mar 5 1:17 PM
      • 0 Attachment
        * El 05/03/06 a las 13:08, Gerald Lai chamullaba:

        > On Sun, 5 Mar 2006, Luis A. Florit wrote:
        >
        > >* El 05/03/06 a las 17:39, Luis A. Florit chamullaba:
        > >
        > >>>>nmap OA <Up>
        > >>>>
        > >>>>that works fine, EXCEPT because now the O command in normal
        > >>>>mode waits for a second for a 2nd key, as you said...
        > >>>>So, I had to make another setting:
        > >>>>
        > >>>>set timeout timeoutlen=1000 ttimeoutlen=100
        > >>>>
        > >>>>for the O to not wait that long (1/10 sec).
        > >>>
        > >>>A correction:
        > >>>set timeout timeoutlen=1000 ttimeoutlen=100
        > >>>works fine if, instead of :nmap OA <Up>
        > >>>we make
        > >>>
        > >>>set <xF2>=OA
        > >>>nmap <xF2> <Up>
        > [snip]
        >
        > Sorry, I forgot to include one detail that was 'ttimeoutlen'. The
        > advantage of "encapsulating" the keycode in <xFn> like:
        >
        > set timeout timeoutlen=1000 ttimeoutlen=100
        > set <xF2>=^[[a
        > map <xF2> <S-Up>
        >
        > as opposed to only:
        >
        > map <Esc>[a <S-Up>
        >
        > is that <xF2> can be treated as a keycode of a single keystroke
        > (within a mapping context) as opposed to a mapping of multiple
        > keystrokes.
        >
        > Then setting 'ttimeoutlen' to a really small value ensures that the
        > keycodes cannot (be humanly-possible but shell-possible to) be
        > entered manually.
        >
        > Hope I'm making sense :)

        Yep, now you do. ;)

        L.
      Your message has been successfully submitted and would be delivered to recipients shortly.