Question about color settings

35 views
Skip to first unread message

Gabor Urban

unread,
Dec 26, 2018, 5:32:50 AM12/26/18
to vim...@googlegroups.com
Hi,

I have made some VIM color schemes, but I still have some problems. The most disturbing is 
the difference between the term... and cterm setting. I did look it up on the net, but could 
not find appropriate information. Can anyone help?

I am using MS Windows both in GUI and command prompt mode. What kind of terminal is set when I 
start VIM from a DOS command prompt?

Looking for your answer...

--
Urbán Gábor
 
Linux is like a wigwam: no Gates, no Windows and an Apache inside.

Tony Mechelynck

unread,
Dec 26, 2018, 6:58:58 AM12/26/18
to vim...@googlegroups.com
On Wed, Dec 26, 2018 at 11:32 AM Gabor Urban <urba...@gmail.com> wrote:
>
> Hi,
>
> I have made some VIM color schemes, but I still have some problems. The most disturbing is
> the difference between the term... and cterm setting. I did look it up on the net, but could
> not find appropriate information. Can anyone help?

The "term" settings are for monochrome terminals, whose text can be
bright or dim, or reverse-video, but where no contrasting colors are
possible. I had such a video screen (a yellow-and-black CRT on a
Hercules graphic card) when I started using MS-DOS on a PC-AT several
decades ago, but nowadays AFAIK they are only to be found in museums.
The "cterm" settings are for text-only color videos, and the "gui"
settings are for gvim (or for the MacVim GUI).
>
> I am using MS Windows both in GUI and command prompt mode. What kind of terminal is set when I
> start VIM from a DOS command prompt?

When you start it as "vim", and it displays your edited text inside
the DOS box, it uses the "cterm" settings, unless 'termguicolors' is
on, which is not the default. When you start it as "gvim", or when
'termguicolors' is on, it will use the "gui" settings. It would only
use the "term" settings if you were running on a monochrome terminal;
I'm not sure Windows can be used on such a terminal.

See «:help 'termguicolors'» about what kinds of hardware and software
are necessary for that option to work.
>
> Looking for your answer...

HTH
>
> --
> Urbán Gábor
>
> Linux is like a wigwam: no Gates, no Windows and an Apache inside.

:-)

Best regards,
Tony.

meine

unread,
Dec 27, 2018, 9:32:51 AM12/27/18
to vim...@googlegroups.com
> I am using MS Windows both in GUI and command prompt mode. What kind of
> terminal is set when IĀ
> start VIM from a DOS command prompt?

you could add some lines to your .vimrc to distinguish between GUI en
CLI environment but use the same settings like line numbering in both
envoronments. the blocks can be extended as you like. it is possible
that naming the environment (`x11' for using the X window system) has to
be called differently on a Windows box. I don't have any experience with
that.

below is the part I use:

if has('gui_running')
colorscheme molokai_dark
set guifont=Monospace\ 10
set columns=85 lines=30
elseif has('x11')
colorscheme molokai_dark
set guifont=Monospace\ 10
" set columns=85 lines=30
else
colorscheme evening
set t_Co=256
endif

//meine
Reply all
Reply to author
Forward
0 new messages