[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Which terminal is similar to dumb but with color support?
From: |
Mike Gran |
Subject: |
Re: Which terminal is similar to dumb but with color support? |
Date: |
Tue, 2 Jun 2015 17:40:57 +0000 (UTC) |
> 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. 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