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

Re: Reading from stdin

Expand Messages
  • Bram Moolenaar
    ... That is true. You need to set term to something else than win32 to read from stdin. But we would want vim
    Message 1 of 4 , Oct 3, 2002
      Walter Briscoe wrote:

      > >No, Vim reads commands from stdin. Only when nothing is read at all
      > I don't think that is true for the win32 console port.

      That is true. You need to set 'term' to something else than "win32" to
      read from stdin. But we would want "vim < file" to work like it works
      on Unix without that kind of tricks.

      > Something similar happens for vim -R < q. In that case, keystrokes do
      > not find their way to the application. In UNIX, read() is done from
      > read_cmd_fd which defaults to 0 (stdin). I think the Win32 port assumes
      > control is only made from the console device and that vim -R < foo is
      > not modelled. I think the win32 port should read from stdin rather than
      > the console device when stdin is not the console device.

      Something like that. Making it work more like how it works on Unix
      would be better. Would require trying it out and thinking about when
      this would break. Keep in mind things like resizing the console window
      (both on Win 9x and Win NT, it's quite different). That's the work to
      be done.

      > I suspect that todo.txt acts as an "aide memoire" for Bram and some
      > information is lost between reporting a problem and its appearance in
      > todo.txt.

      Yes, I summarize the relevant info. The todo list is quite long

      > What do you mean by "what Vi does exactly"? Which Vi? I can
      > probably find a Vi referenced in the POSIX 2001 standardisation process.
      > (I seem to recall the author is Keith Borthwick.)
      > Would that satisfy your purposes?

      No, POSIX attempted to describe what Vi does and their attempt is
      certainly not defining the actual implementations. The "real" Vi is
      what is shipped with older versions of Unix, such as Sun OS before they
      started Solaris. The version I'm mostly using to compare with is "Version
      3.7, 6/7/85". Other Vi versions have subtle differences.

      hundred-and-one symptoms of being an internet addict:
      114. You are counting items, you go "0,1,2,3,4,5,6,7,8,9,A,B,C,D...".

      /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
      /// Creator of Vim - Vi IMproved -- http://www.vim.org \\\
      \\\ Project leader for A-A-P -- http://www.a-a-p.org ///
      \\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html ///
    Your message has been successfully submitted and would be delivered to recipients shortly.