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

57836Re: piping never-ending STDIN to vim ( == tail -f with syntax hiliting)

Expand Messages
  • Michael Naumann
    Apr 3, 2005
      On Sunday 03 April 2005 14:36, A. J. Mechelynck wrote:
      > I may be wrong, but I believe it's not possible. IIUC, Vim's editing
      > "strategy" is to read the whole file into memory, then display it and
      > allow the user to edit it. If the editfile is a device which will
      > produce endless data without an end-of-file signal (such as, but not
      > limited to, /dev/zero on Unix), Vim will never reach the end of its
      > input reading and will, IIUC, either have to be killed manually, or
      > terminate when reaching the end of available memory size (system memory
      > or 'maxmem'/'maxmemtot' memory, whichever is smaller; the latter will
      > not go higher than 2 GB, at least not on systems with 32-bit longint
      > format -- it's not clear to me [conflict between ":help 'maxmemtot'" and
      > ":help limits"] whether it will go higher on 64-bit machines).
      > Best regards,
      > Tony.

      Though your statement is essentially true (to my knowledge) you do not
      have to manually kill your vim in such a case. You can also ^C to
      terminate the reading from stdin.
      You can try
      yes|vim -
      But ... don't wait too long to hit ^C, "yes" will produce it's output
      rather quickly

      HTH, Michael
    • Show all 3 messages in this topic