Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Vim: Warning: Output is not to a terminal

by jeanluca (Deacon)
on Jun 22, 2010 at 08:38 UTC ( [id://845859]=perlquestion: print w/replies, xml ) Need Help??

jeanluca has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks

I tried to execute the following command in my perl script:
`vimdiff live/$file test/$file` ;
Which doesn't return the graphical window with the differences, but shows on the command line
Vim: Warning: Output is not to a terminal
and the terminal doesn't respond to anything anymore.

Any suggestions how to fix this ?

Cheers
LuCa

UPDATE: thnx moritz, system works!!

Replies are listed 'Best First'.
Re: Vim: Warning: Output is not to a terminal
by moritz (Cardinal) on Jun 22, 2010 at 08:43 UTC
    Use diff, not vimdiff.

    Alternatively you can use expect to capture output to the terminal.

      diff is not the same thing as vimdiff. Is there, for example, no way to start the command in a new shell/terminal ?
        I might have misunderstood what you try to accomplish.

        Since you've used backticks, I assumed you want to obtain the output from vimdiff - which doesn't work that way, because vim talks to the terminal directly instead of printing to STDOUT. That's why I suggested diff instead, which does print to STDOUT.

        If you want to spawn an interactive vim, just use system - works fine here.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://845859]
Approved by moritz
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (4)
As of 2024-04-20 00:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found