Vscode: Provide "terminal.integrated.enableBold" setting

Created on 10 Mar 2017  路  20Comments  路  Source: microsoft/vscode

It will be great to have a possibility to change a font weight for the integrated terminal. Now a text inside it looks bolder than a text in the editor:

screenshot from 2017-03-11 00-19-24

  • VSCode Version: 1.10.2
  • OS Version: Ubuntu 16.04
feature-request good first issue help wanted integrated-terminal verification-needed verified

Most helpful comment

@Tyriar If this setting exists I would expect it to work on all terminals as @isidorn mentioned. A workaround would be to make description to point out which terminals are supported.
E.g. default Windows cmd supports bolding, although this setting is not working for it.

P.S. you've pinged a different person (it happens most people confuse my nickname with michaelchiche, poor guy gets many notifications that are addressed to me 馃槂).

All 20 comments

Do you mean you want to set all text in the terminal to be bold? Because that would conflict with the shell's ability to bold text itself:

image

Do you have any editor specific settings that deal with font weight?

Do you mean you want to set all text in the terminal to be bold?
Yes, for example, to set all text in the terminal as "normal", "bold", etc.

VS Code terminal (different font weight):
screenshot from 2017-03-11 00-51-45

Ubuntu terminal (same font weight):
screenshot from 2017-03-11 00-52-15

Do you have any editor specific settings that deal with font weight?
No, for the editor in VS Code I have default font weight settings.

Do you have this set in gnome-terminal?

image

No, I have it is disabled now. With "Allow bold text" checkmark a font weight behavior is the same as in VS Code terminal.

Ok, makes sense :smile:

Accepting PRs on this, you will need to:

  • Add the setting to terminal.contribution.ts
  • Add the setting to the terminal.ts config interface
  • Set some class on .integrated-terminal.panel based on the setting
  • Add CSS for the class in xterm.css

@Tyriar @yustnip I would take this PR. Can I ?

@lifez that would be awesome 馃槂

Great I will do this PR :)

I've implemented the terminal setting on the PR #22465 , it'd be nice to get some comments on it :)

Cannot verify, as I don't see a difference between "terminal.integrated.enableBold": true and false on Windows cmd and powershell integrated terminals in VS Code v1.11.0.

I also do not see the difference on my osx zsh shell,
Reopening this issue. I propose to either make it work on all platforms or to remove this setting or at the very least document that it only works on linux.

@michelkaporin I don't think bold is used on cmd or PS unless you use a custom prompt?

@isidorn I expect it to work fine on all platforms, it depends on whether your shell outputs bold. Could you try again by running the following and comparing the styles?

echo -e '\x1b[1mFOO\x1b[0mFOO'

image

They should look the same when the setting it true:

image

@Tyriar If this setting exists I would expect it to work on all terminals as @isidorn mentioned. A workaround would be to make description to point out which terminals are supported.
E.g. default Windows cmd supports bolding, although this setting is not working for it.

P.S. you've pinged a different person (it happens most people confuse my nickname with michaelchiche, poor guy gets many notifications that are addressed to me 馃槂).

@Tyriar for me they are the same in both cases (setting false and setting true). However if I run the command in my iTerm i nicely get the output bolded

screen shot 2017-03-30 at 10 36 43

screen shot 2017-03-30 at 10 36 32

@isidorn does the font you use in the terminal not have a bold variant maybe? It doesn't look like the top screenshot has any bold text.

@michelkaporin all terminals that can output bold text are supported. If enableBold is true and bold text is showing up, flipping it to false should make the text non-bold. Maybe allowBold would be more fitting for what it is doing?

@Tyriar I am not using any special font in the terminal, not sure if it supports bold. Inspecint it in chrome dev it is the usual font-family: Menlo, Monaco, 'Courier New', monospace;

P.S aren't you sleeping 馃榿

@Tyriar I would stick to enableBold but changing the description of the setting.

all terminals that can output bold text are supported

As I've said bolding in cmd.exe terminal does not work for me.

@isidorn my sleep was a bit funky yesterday :stuck_out_tongue:. One way to test whether the font supports bold is to manually add font-weight:bold to the element in devtools.

@michaelchiche :+1: deferred to April as it's the end of endgame https://github.com/Microsoft/vscode/issues/23694

Was this page helpful?
0 / 5 - 0 ratings