On 2010-10-13, Jürgen Krämer wrote:
> Hi
> 
> Jeenu wrote:
> > 
> > I noticed that running commands like ':!svn info' from Vim in both
> > Cygwin and Linux machines differ. On Linux machines, the output looked
> > like how it's displayed in terminal. However, with Vim on Cygwin
> > (PuTTYCyg client) I see no CR's, and the whole display take a stepping
> > formation. Is these some option inside Vim which can control this
> > behavior?
> 
> sounds like a misconfigured PuTTY. In the Windows version there is an
> option "Implicit CR in every LF" in the "Terminal" part of the
> configuration dialog. Is this option present and checked?

It's not just a problem with PuTTY; mintty does this, too, and there
is no setting among mintty's options to correct this.  No other
application that I've run in mintty does this, just Vim.  It's been
one of those annoyances I just haven't had the time to investigate
properly.

I read this list using mutt on a machine running Cygwin.  At the
moment, I'm logged into that machine via from a laptop which is also
running Cygwin.  The terminal is mintty.  From mutt, I can execute

    !ls

and see a properly-formatted result.  If instead I execute

    !vim

and from within Vim execute

    :!ls

I get the stair-stepped result reported by Jeenu.

Also, the behavior is inconsistent.  Again, I haven't taken the time
to study this carefully, but sometimes the output from a :! command
does have the proper formatting.  It's as though Vim only sometimes
forgets to include the CR.

My workaround has been to pipe the output of :! commands through
u2d, as

    :!ls | u2d


OK, I just tried another experiment.  I opened a new mintty terminal
on the laptop--no ssh.  "ls" works fine.  I executed "less" on a
file and within less, executed

    !ls

Again, the formatting was correct.  I then executed

    !vim

and within the resulting Vim executed

    :!ls

The formatting was correct!  I executed the same ":!ls" command and
the formatting was still correct.  Then I hit Enter so that the
output of the two ls commands was cleared from the screen and the
cursor returned to the upper left corner of the Vim window.  Then I
executed

    :!ls

again, but this time the output was stair-stepped!

I exited vim, which returned me to less, and with less executed
"!ls" again.  The output was correctly formatted--no stair stepping.

Since I haven't identified the root cause, it could be a problem in
both mintty and PuTTY (I believe mintty is derived from PuTTY), but
it certainly appears that Vim doesn't always set or reset something
(the line discipline?) correctly.  Mutt and less both appear to do
this correctly.

Regards,
Gary

-- 
You received this message from the "vim_use" 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

Reply via email to