How to disable bold font in vim?

3,009 views
Skip to first unread message

Clark J. Wang

unread,
Aug 11, 2008, 1:36:31 AM8/11/08
to vim_use
Hi, all,

I'm using vim under Mac OS X's Terminal application. Some colors are
shown as bold font which looks not good in Terminal. So the question
is how can I disable bold fonts in vim? For now, I have to manually
change the colorscheme files by using Dark colors instead of light (?)
colors (e.g. use DarkMagenta instead of Magenta).

Thanks.

Ben Schmidt

unread,
Aug 11, 2008, 9:03:53 AM8/11/08
to vim...@googlegroups.com
> I'm using vim under Mac OS X's Terminal application. Some colors are
> shown as bold font which looks not good in Terminal.

I don't seem to have this problem, so I suppose it is to do with your
colour scheme. Vim help recommends not mixing attributes with colouring,
but it wouldn't surprise me if some colour schemes did so. Or perhaps
Vim's defaults have some bold in them and they aren't cleared.

> So the question is how can I disable bold fonts in vim?

The simplest thing I can think of is basically what you're already
doing: change the colour scheme files. Better, though, is to make a copy
of $VIMRUNTIME/colors/whateveryouuse.vim in ~/.vim/colors.

You can then search it for cterm=\S*bold and remove bold from the list,
or change to =NONE if it's the only thing in the list. If that doesn't
work, figure out which colours still have the bold and add cterm=NONE to
those :hi commands in the scheme to ensure the Vim default is overridden.

> For now, I have to manually
> change the colorscheme files by using Dark colors instead of light (?)
> colors (e.g. use DarkMagenta instead of Magenta).

Did this actually stop it being bold, or just make it nicer to look at
because the colour was darker?

Ben.


Tony Mechelynck

unread,
Aug 11, 2008, 1:55:07 PM8/11/08
to vim...@googlegroups.com

What happens if, before setting ":syntax on", you set t_Co to 8 and t_md
to empty?

if !has('gui_running')
set t_Co=8 t_md=
endif


Best regards,
Tony.
--
Colvard's Logical Premises:
All probabilities are 50%. Either a thing will happen or it
won't.

Colvard's Unconscionable Commentary:
This is especially true when dealing with someone you're
attracted to.

Grelb's Commentary
Likelihoods, however, are 90% against you.

Clark J. Wang

unread,
Aug 11, 2008, 11:30:00 PM8/11/08
to vim_use
On Aug 11, 9:03 pm, Ben Schmidt <mail_ben_schm...@yahoo.com.au> wrote:
> > I'm using vim under Mac OS X's Terminal application. Some colors are
> > shown as bold font which looks not good in Terminal.
>
> I don't seem to have this problem, so I suppose it is to do with your
> colour scheme. Vim help recommends not mixing attributes with colouring,
> but it wouldn't surprise me if some colour schemes did so. Or perhaps
> Vim's defaults have some bold in them and they aren't cleared.
>
> > So the question is how can I disable bold fonts in vim?
>
> The simplest thing I can think of is basically what you're already
> doing: change the colour scheme files. Better, though, is to make a copy
> of $VIMRUNTIME/colors/whateveryouuse.vim in ~/.vim/colors.
>
> You can then search it for cterm=\S*bold and remove bold from the list,
> or change to =NONE if it's the only thing in the list. If that doesn't
> work, figure out which colours still have the bold and add cterm=NONE to
> those :hi commands in the scheme to ensure the Vim default is overridden.
>
This works for me. Thanks.
> > For now, I have to manually
> > change the colorscheme files by using Dark colors instead of light (?)
> > colors (e.g. use DarkMagenta instead of Magenta).
>
> Did this actually stop it being bold, or just make it nicer to look at
> because the colour was darker?
>
I think it really disables bold. But some app like PuTTY can be
configured to disable bold text, it has a setting: Bolded text is a
different color
> Ben.

Clark J. Wang

unread,
Aug 11, 2008, 11:31:30 PM8/11/08
to vim_use
On Aug 12, 1:55 am, Tony Mechelynck <antoine.mechely...@gmail.com>
wrote:
> On 11/08/08 07:36, Clark J. Wang wrote:
>
> > Hi, all,
>
> > I'm using vim under Mac OS X's Terminal application. Some colors are
> > shown as bold font which looks not good in Terminal. So the question
> > is how can I disable bold fonts in vim? For now, I have to manually
> > change the colorscheme files by using Dark colors instead of light (?)
> > colors (e.g. use DarkMagenta instead of Magenta).
>
> > Thanks.
>
> What happens if, before setting ":syntax on", you set t_Co to 8 and t_md
> to empty?
>
>         if !has('gui_running')
>                 set t_Co=8 t_md=
>         endif
>
Seems like this is an elegant solution so I can add that to my vimrc.
Thanks.
Reply all
Reply to author
Forward
0 new messages