You are not logged in.

#1 2011-06-04 14:08:38

jpmelos
Member
From: São Carlos, SP, Brazil
Registered: 2011-03-27
Posts: 18
Website

[SOLVED] Bold in Vim

Hello, people.

I'd like to know how can I activate bold fonts in Vim. But it's a weird situation, because:

- bold fonts do not work if I'm using Vim from pure URxvt; but
- they work if I'm using Vim inside tmux; and
- it's not a font problem, because the command prompt is bold, and Vim is using the same font; and
- it's not a color scheme problem, because Vim uses the same in and out of tmux.

So, how come bold works only inside tmux with Vim?

Thank you very much.

Last edited by jpmelos (2011-06-04 23:09:14)


João Paulo Melo de Sampaio
Studying Computer Engineering @ UFSCar
http://www.jpmelos.com

Offline

#2 2011-06-04 19:58:35

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Bold in Vim

echo $TERM

inside and outside tmux


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2011-06-04 20:59:33

jpmelos
Member
From: São Carlos, SP, Brazil
Registered: 2011-03-27
Posts: 18
Website

Re: [SOLVED] Bold in Vim

Result outside tmux:

rxvt-unicode-256color

Inside tmux:

screen

Is that the cause of the problem?


João Paulo Melo de Sampaio
Studying Computer Engineering @ UFSCar
http://www.jpmelos.com

Offline

#4 2011-06-04 22:06:03

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Bold in Vim

What happens if you set your tmux term like so:

TERM=screen-256color

Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2011-06-04 22:27:08

jpmelos
Member
From: São Carlos, SP, Brazil
Registered: 2011-03-27
Posts: 18
Website

Re: [SOLVED] Bold in Vim

Uh... Interesting. Now there's no bold inside and outside tmux.

I do not know about this stuff, so I'm just guessing, but this makes sense to me:

Could it be that my Vim is loading a color scheme for 256-color terminals that doesn't have bold in it, and then when using terminals that doesn't support 256 colors, it loads a color scheme that does support bold?

Sorry if that's complete and utterly bullshit, I'm just trying to help you help me! But if that's it, how do I make this color scheme for 256-color terminals support bold? Because I kinda like this color scheme better than the bold one! Just that it would be better with the bold settings from the other one.

Thank you!


João Paulo Melo de Sampaio
Studying Computer Engineering @ UFSCar
http://www.jpmelos.com

Offline

#6 2011-06-04 22:31:54

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Bold in Vim

jpmelos wrote:

Uh... Interesting. Now there's no bold inside and outside tmux.

You have to set it for tmux alone - not your regular term...

Put this in your .bashrc

[ -n "$TMUX" ] && export TERM=screen-256color

source your .bashrc (or start another shell) and restart tmux.

What is the colorscheme? (Pastebin it if necessary)


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#7 2011-06-04 22:41:19

jpmelos
Member
From: São Carlos, SP, Brazil
Registered: 2011-03-27
Posts: 18
Website

Re: [SOLVED] Bold in Vim

I did that. There's no bold inside and outside tmux.

And I'm using the default colorscheme, I didn't set any special one.

It's just that Vim is showing different colors and bold when there's no 256-color terminal set, and showing other colors and no bold with terminal set to 256-color.


João Paulo Melo de Sampaio
Studying Computer Engineering @ UFSCar
http://www.jpmelos.com

Offline

#8 2011-06-04 23:01:14

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Bold in Vim

Now your term is set correctly smile

Do you set bg={dark,light} in your .vimrc?

Apply another colorscheme that has bold in it.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#9 2011-06-04 23:08:35

jpmelos
Member
From: São Carlos, SP, Brazil
Registered: 2011-03-27
Posts: 18
Website

Re: [SOLVED] Bold in Vim

Thank you very much for your help, Jason!

Thanks to your suggestion, I tried to find the default theme my Vim was using, and there were some themes there in the folder. I tried some of them, and I eventually found one that supports bold and has the same color settings as the default!

I'm using it right now, and it works all right!

And yes, I had 'set bg=dark' in my vimrc.

Thank you very much, really appreciated!


João Paulo Melo de Sampaio
Studying Computer Engineering @ UFSCar
http://www.jpmelos.com

Offline

Board footer

Powered by FluxBB