[Top][All Lists]

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

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

From: Peng Yu
Subject: Re: Which terminal is similar to dumb but with color support?
Date: Tue, 2 Jun 2015 14:34:03 -0500

On Tue, Jun 2, 2015 at 12:40 PM, Mike Gran <address@hidden> wrote:
>> On Tuesday, June 2, 2015 9:57 AM, Peng Yu <address@hidden> wrote:
>> >>  Do you know where I should start? Thanks.
>> I got the following problem. Do you know what is wrong and how to fix
>> it? Thanks.
>> $ cat dumb_256color.txt
>> dumb-256color|80-column dumb-256color tty,
>>     am,
>>     cols#80,colors#256,
>>     bel=^G, cr=^M, cud1=^J, ind=^J,
>> $ tic dumb_256color.txt
>> $ vim -T dumb-256color -c 'echohl ErrorMsg' -c 'echo "Hello
>> World!"' -c q
> Hi.  Sorry to jump in to the middle of this conversation.
> You seem to think that vim will run on a dumb terminal. I am fairly
> certain that it will not run on a dumb terminal.
> For example, this error indicates that you are attempting to run vim
> using a terminal that doesn't contain the "cm" capability.

Why can I make a terminal which says it contains the "cm" capability
to cheat vim but actually does nothing.

> Vim will
> refuse to run if your terminal does not have a "cm" capability.
> The "cm" capability is termcap name of the "cursor address" capability,
> which is the capability to move the cursor to a given row and column on
> the screen.
> If your terminal can move to a given row and column, it is, by
> definition, not a dumb terminal.
> So, I believe you are trying to do is not going to work.
> I think what you are actually trying to accomplish is to print
> a message with a white text on a red background.  And, for some
> reason, you don't want to specify a particular terminal.
> A short, ugly way to accomplish this is directly to use the SGR ANSI
> color escape sequence.  This works on many color terminals.
> echo "\033[37;41mHello World"
> Hope this helps,
> Mike Gran


reply via email to

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