Vim: Warning: Output is not to a terminal

2,541 views
Skip to first unread message

Kote Dekuur

unread,
Jul 29, 2011, 6:07:50 PM7/29/11
to v...@vim.org, vim...@googlegroups.com
Hi,

Happy Friday everyone!

Have anyone seen this error before?

Vim: Warning: Output is not to a terminal

I'm writing a bash script to do merges in Mercurial and using vimdiff as the merge tool.   When there are merge conflicts that requires manual interactions it will open up vimdiff of the two files, but it seems to hang on

Vim: Warning: Output is not to a terminal   and the terminal is stuck.

I have no problems executing vimdiff <file1> <file2> manually.  This only happens when running it through a bash script.  I'm not sure if I'm missing an environment setting somewhere.

Thanks,

KD

Bram Moolenaar

unread,
Jul 31, 2011, 7:44:00 AM7/31/11
to Kote Dekuur, v...@vim.org

Kote Dekuur wrote:

If you redirect Vim input it will read commands from there. If the
stdin actually contains text use the "-" argument, e.g.:

ls . | vim -

If you redirect Vim output you get the message you mentioned. You then
can't see what you are doing, but you can still edit.

Try typing ":qa!". If only output was redirected it should get you out
of the stuck situation.

If both input and output are redirected, you are really stuck.

--
I'm sure that I asked CBuilder to do a "full" install. Looks like I got
a "fool" install, instead. Charles E Campbell, Jr, PhD


/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Fuzzy Logic

unread,
Nov 14, 2011, 4:22:58 PM11/14/11
to v...@vim.org
I read :help 26.4 and I'm still a bit stuck.

I was previously using Vim 7.2 with the following:

file fixnbsp.vim contained:
:%s/> />\&nbsp;/g
:%s/ </\&nbsp;</g
:wq

and a shell script under Cygwin with the following snippet:

# Build new compares.
for f in $(cat $ALLFILES); do
if [ -e new/$f ]; then
c:/Program\ Files/Beyond\ Compare\ 2/BC2.exe @shortcompare.txt $f
c:/Program\ Files/Vim/vim72/vim.exe -S fixnbsp.vim compares/$f.html
fi
done

A nearly identical setup (substitute vim73 for vim72) outputs:


Vim: Warning: Output is not to a terminal

Vim: Warning: Input is not from a terminal

Reading :help 26.4 and the examples, I changed fixnbsp.vim to:
%s/> />\&nbsp;/g
%s/ </\&nbsp;</g
write
quit

and the vim step in the loop to:
c:/Program\ Files\ \(x86\)/Vim/vim73/vim.exe -e -s
compares/$f.html < fixnbsp.vim
which is the same as the example:
vim -e -s $file < change.vim
(obviously, I changed the "write tempfile" to just "write" since I
want to change in place)

This just seems to hang. (possibly on the write?)

I know I could use sed, but I would just like to know whether
something changed in Vim 7.3 that changed this behavior, and what I
could do to make this work.

BTW, from http://www.vim.org/maillist.php#vim clicking the "tips
archive" from the "Comments" section gives a 404.

Fuzzy

Message has been deleted

Fuzzy Logic

unread,
Nov 18, 2011, 12:49:18 PM11/18/11
to v...@vim.org
Any ideas? What confuses me is that it gave no messages with Vim 7.2,
but does with Vim 7.3.

Fuzzy Logic

unread,
Nov 26, 2011, 6:29:38 PM11/26/11
to vim_use

One last try... I can go look over several hundred patches, but I was hoping someone might have an idea. Any thing I should look for?

Reply all
Reply to author
Forward
0 new messages