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

Re: Vim stops

Expand Messages
  • Tony Mechelynck
    ... I did the experiment, and somehow the result is different in konsole and in the Linux (text) console: Let s say I press and hold z, and while holding z I
    Message 1 of 5 , Jul 8, 2013
    • 0 Attachment
      On 08/07/13 17:35, Nikolay Pavlov wrote:
      >
      > On Jul 8, 2013 7:00 PM, "Dimitar DIMITROV" <mitkofr@...
      > <mailto:mitkofr@...>> wrote:
      > >
      > > Resending this as apparently it wasn't clear, hope it is now
      > >
      > > Hi, running the latest version of vim (from mercurial) I experience
      > the following weird behaviour:
      > >
      > > 1. command /usr/local/bin/vim -nNX -u NONE
      > > 2. zzzzzzzzzzzz shift
      > > explanation: press z and hold for a few seconds
      > > now while pressing z, press also shift
      > > so it results in zzzzzzzzzzzz+shift NOT ZZ or
      > shift+z
      > > Vim stops
      >
      > Now repeat this in shell and post result here. I am absolutely sure you
      > will see ZZ: it is what I see. If you see this bug your terminal
      > emulator, X11 or whatever authors, but not us: quit when ZZ was received
      > is an expected behavior and generating user input is not vim business,
      > vim only consumes input generated by terminal emulator which in turn
      > receives it from X server which in turn receives it from kernel (and it
      > receives from hardware).
      >
      > Also what do you expect to happen if not vim exit?


      I did the experiment, and somehow the result is different in konsole and
      in the Linux (text) console: Let's say I press and hold z, and while
      holding z I press and release Shift.

      in konsole:
      zzzzzzzzzzzzzzzzzzzzzzzzzzZZZZZZZZZZZZZZZZZZZZzzzzzzzzzzzzzzzzzzz

      in Linux console (i.e., the Ctrl-Alt-Fn terminal where 1 <= n <= 6)
      zzzzzzzzzzzzzzzzzzzzzzzzzz
      (i.e. the string of letters stops as soon as I hit Shift).

      Maybe Vim (in an X11 terminal emulator) displays the ZZ (it may deped on
      the 'showcmd' setting) but then Vim exits so fast that you don't have
      time to see it. See ":help ZZ".

      And the fact that you start Vim with -X doesn't mean that you aren't
      running under X11, it's just that in that case Vim doesn't try to use
      the special X11 capabilities (such as the clipboard, and the
      client-server feature), it still runs in a terminal emulator and _that
      terminal_ (xterm, konsole, mlterm, gnome-terminal, etc.) does its input
      and output as an X11 GUI, of which Vim has no knowledge.

      It is always possible to have ZZ do nothing: in 'nocompatible' mode,

      :map ZZ <Nop>

      will do it.


      Best regards,
      Tony.
      --
      You too can wear a nose mitten.

      --
      --
      You received this message from the "vim_dev" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php

      ---
      You received this message because you are subscribed to the Google Groups "vim_dev" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Marcin Szamotulski
      ... Another way of checking what is going on is to use the -W switch which will record keys that vim is recieving: vim -XW /tmp/keys # do the experiment cat
      Message 2 of 5 , Jul 8, 2013
      • 0 Attachment
        On 19:07 Mon 08 Jul , Tony Mechelynck wrote:
        > On 08/07/13 17:35, Nikolay Pavlov wrote:
        > >
        > > On Jul 8, 2013 7:00 PM, "Dimitar DIMITROV" <mitkofr@...
        > > <mailto:mitkofr@...>> wrote:
        > > >
        > > > Resending this as apparently it wasn't clear, hope it is now
        > > >
        > > > Hi, running the latest version of vim (from mercurial) I experience
        > > the following weird behaviour:
        > > >
        > > > 1. command /usr/local/bin/vim -nNX -u NONE
        > > > 2. zzzzzzzzzzzz shift
        > > > explanation: press z and hold for a few seconds
        > > > now while pressing z, press also shift
        > > > so it results in zzzzzzzzzzzz+shift NOT ZZ or
        > > shift+z
        > > > Vim stops
        > >
        > > Now repeat this in shell and post result here. I am absolutely sure you
        > > will see ZZ: it is what I see. If you see this bug your terminal
        > > emulator, X11 or whatever authors, but not us: quit when ZZ was received
        > > is an expected behavior and generating user input is not vim business,
        > > vim only consumes input generated by terminal emulator which in turn
        > > receives it from X server which in turn receives it from kernel (and it
        > > receives from hardware).
        > >
        > > Also what do you expect to happen if not vim exit?
        >
        >
        > I did the experiment, and somehow the result is different in konsole and
        > in the Linux (text) console: Let's say I press and hold z, and while
        > holding z I press and release Shift.
        >
        > in konsole:
        > zzzzzzzzzzzzzzzzzzzzzzzzzzZZZZZZZZZZZZZZZZZZZZzzzzzzzzzzzzzzzzzzz
        >
        > in Linux console (i.e., the Ctrl-Alt-Fn terminal where 1 <= n <= 6)
        > zzzzzzzzzzzzzzzzzzzzzzzzzz
        > (i.e. the string of letters stops as soon as I hit Shift).
        >
        > Maybe Vim (in an X11 terminal emulator) displays the ZZ (it may deped on
        > the 'showcmd' setting) but then Vim exits so fast that you don't have
        > time to see it. See ":help ZZ".
        >
        > And the fact that you start Vim with -X doesn't mean that you aren't
        > running under X11, it's just that in that case Vim doesn't try to use
        > the special X11 capabilities (such as the clipboard, and the
        > client-server feature), it still runs in a terminal emulator and _that
        > terminal_ (xterm, konsole, mlterm, gnome-terminal, etc.) does its input
        > and output as an X11 GUI, of which Vim has no knowledge.
        >
        > It is always possible to have ZZ do nothing: in 'nocompatible' mode,
        >
        > :map ZZ <Nop>
        >
        > will do it.
        >
        >
        > Best regards,
        > Tony.
        > --
        > You too can wear a nose mitten.
        >
        > --
        > --
        > You received this message from the "vim_dev" maillist.
        > Do not top-post! Type your reply below the text you are replying to.
        > For more information, visit http://www.vim.org/maillist.php
        >
        > ---
        > You received this message because you are subscribed to the Google Groups "vim_dev" group.
        > To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
        > For more options, visit https://groups.google.com/groups/opt_out.
        >

        Another way of checking what is going on is to use the -W switch which
        will record keys that vim is recieving:

        vim -XW /tmp/keys
        # do the experiment
        cat /tmp/keys
        zzzzzzzzZZZ

        So ineed vim is getting ZZ from the terminal emulator.
        I am not sure why it get's three Z though. I'd expected to see only two
        of them.

        Regards,
        Marcin

        --
        --
        You received this message from the "vim_dev" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php

        ---
        You received this message because you are subscribed to the Google Groups "vim_dev" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
      • John Little
        ... The last z eats the first Z, if there are an odd number of z s, as z is a prefix to two key commands. Regards, John Little -- -- You received this message
        Message 3 of 5 , Jul 9, 2013
        • 0 Attachment
          Marcin said:
          > I am not sure why it get's three Z though. I'd expected to see only two of them.

          The last z eats the first Z, if there are an odd number of z's, as z is a prefix to two key commands.


          Regards, John Little

          --
          --
          You received this message from the "vim_dev" maillist.
          Do not top-post! Type your reply below the text you are replying to.
          For more information, visit http://www.vim.org/maillist.php

          ---
          You received this message because you are subscribed to the Google Groups "vim_dev" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
          For more options, visit https://groups.google.com/groups/opt_out.
        Your message has been successfully submitted and would be delivered to recipients shortly.