bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Which terminal is similar to dumb but with color support?


From: Thomas Dickey
Subject: Re: Which terminal is similar to dumb but with color support?
Date: Sun, 31 May 2015 20:53:45 -0400
User-agent: Mutt/1.5.20 (2009-06-14)

On Sat, May 30, 2015 at 10:03:13PM -0500, Peng Yu wrote:
> Hi,
> 
> The following command can not print the output in color format.
> 
> vim -T dumb -c 'echohl ErrorMsg' -c 'echo "Hello World!"' -c q

That's expected.  By the way, vim is not using the terminal description
from ncurses for "dumb", which looks like this:

        dumb|80-column dumb tty,
                am,
                cols#80,
                bel=^G, cr=^M, cud1=^J, ind=^J,

I can see that it is not using the terminal description because it uses
cursor-positioning (which is absent from "dumb"):

        \n\f
        \E[40;1HHello World!\r\r\r
        \n
 
> The following command can print the output in color format. But it
> also print a lot of empty lines.
> 
> vim -T xterm-colors -c 'echohl ErrorMsg' -c 'echo "Hello World!"' -c q

Actually, I get just a reverse-video (no color).
Again, whatever vim uses for "xterm-colors" is not from ncurses.
(Perhaps you meant "xterm-color", although that also gave me no color).
 
> I just want to print the output in color with vim without print a lot
> of empty lines.

If it is printing empty lines, that likely is because the description
that vim uses says that the terminal does not implement the "clear"
capability, and is simulating it.

> I have tried to tput to check all the terminals in my system (Mac and
> Ubuntu). But it is hard to find what I want. Could anybody let me know
> there is such a terminal available? Thanks.

It is unlikely that one exists; you might be able to write a terminal
description which makes vim do what you want.

-- 
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]