When run in batch mode, Vim prints verbose :echo messages to stderr (see
":h -s-ex").

Unfortunately, by the look of it end-of-line characters aren't handled
correctly. On my unix machine I get CRLF line endings, and no line
endings on the last line.

To reproduce, create a script "crlf.vim" with the following contents.

    function Echo()
      echo "a"
      echo "b"
      echo "c"
    endfunction
    verbose call Echo()
    quit

Execute it in batch mode, redirecting stderr to a temporary file.

    vim -es <crlf.vim 2>tempfile

These are the contents of the tempfile:

    0000000: 610d 0a62 0d0a 63      a..b..c

Whereas the output I would expect in a unix environment looks like this:

    0000000: 610a 620a 630a         a.b.c.


--
David Bürgin

-- 
-- 
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Raspunde prin e-mail lui