Unsure if this is a bug or what.

Do this in a new console vim instance (console version of MacVim will
show it too, though I am NOT reporting a MacVim problem to the wrong
list):

:redir => foo
:!ls -l
:redir END
:echo foo

What I expect is to see the usual "ls" listing of the current dir
contents.

What I see is not that, but this:

  :!ls -l^M

In other words, the output of "ls -l" is not being redirected into the
variable foo.  Instead the variable foo is getting only the !-command.
The same goes for redirecting into files and registers.

Here's what's weird.  It works as "expected" in MacVim's GUI.  (This
might be why I came to expect it, but I could've sworn it used to work
like this in console vim too).  Perhaps it only works in MacVim by
fluke?  Perhaps I should not have been expecting what I expected?

Anyway, as a point of comparison, the following works in all Vims the way
I expect it to:

:let foo = system("ls -l")
:echo foo

-Manny

-- 
-- 
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/d/optout.

Raspunde prin e-mail lui