New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set t_Co=256 forcely #112

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
2 participants
@mattn
Contributor

mattn commented Aug 3, 2013

I guess, most of users don't use 256 color environment, and vim-airline use background color with the numeric value that higher than 16. For example, my ubuntu box set t_Co to 8 in default. How about set t_Co=256 forcely?

When don't set t_Co=256 on gnome-terminal

When set t_Co=256 on gnome-terminal

@bling

This comment has been minimized.

Show comment
Hide comment
@bling

bling Aug 3, 2013

Member

this is a problem with gnome-terminal not advertising its support correctly (see here).

also, if the user can look up g:airline_force_256color, then they can look up t_Co=256 as well, so i don't think this change belongs in airline.

Member

bling commented Aug 3, 2013

this is a problem with gnome-terminal not advertising its support correctly (see here).

also, if the user can look up g:airline_force_256color, then they can look up t_Co=256 as well, so i don't think this change belongs in airline.

@mattn

This comment has been minimized.

Show comment
Hide comment
@mattn

mattn Aug 3, 2013

Contributor

OK, thus I think airline should convert background value to possible to be displayed. :)

Contributor

mattn commented Aug 3, 2013

OK, thus I think airline should convert background value to possible to be displayed. :)

@bling

This comment has been minimized.

Show comment
Hide comment
@bling

bling Aug 3, 2013

Member

OK, if that's the case i don't think we need g:airline_force_256color; it should just do it automatically if t_Co is not set (similar to how vim-sensible deals with vim settings). also, any particular reason why you submitted #15? i thought it might be because we shouldn't be changing vim settings, but if we're going to changing t_Co, we should be changing laststatus as well. thoughts?

Member

bling commented Aug 3, 2013

OK, if that's the case i don't think we need g:airline_force_256color; it should just do it automatically if t_Co is not set (similar to how vim-sensible deals with vim settings). also, any particular reason why you submitted #15? i thought it might be because we shouldn't be changing vim settings, but if we're going to changing t_Co, we should be changing laststatus as well. thoughts?

@mattn

This comment has been minimized.

Show comment
Hide comment
@mattn

mattn Aug 3, 2013

Contributor

Hmm, you're right. It's difficult problem that point what behaviors the user want. If laststatus is changed with install of airline, some users may suspect airline's behavior. But if user get 256 color, they may be just only happy. It's a settings that they wrote in vimrc. So I'm thinking, if you want to add the code of laststatus,

  • Warning
    Check whether the current &laststatus is default 1 or not. If not default, show warning.
  • Display as possible
    Convert background value to possible to display.
  • Keep current behavoir
    But some users will not notice the way to fix this issue.
  • Add &laststatus again
    With g:airline_force_laststatus

How do you think?

Contributor

mattn commented Aug 3, 2013

Hmm, you're right. It's difficult problem that point what behaviors the user want. If laststatus is changed with install of airline, some users may suspect airline's behavior. But if user get 256 color, they may be just only happy. It's a settings that they wrote in vimrc. So I'm thinking, if you want to add the code of laststatus,

  • Warning
    Check whether the current &laststatus is default 1 or not. If not default, show warning.
  • Display as possible
    Convert background value to possible to display.
  • Keep current behavoir
    But some users will not notice the way to fix this issue.
  • Add &laststatus again
    With g:airline_force_laststatus

How do you think?

@bling

This comment has been minimized.

Show comment
Hide comment
@bling

bling Aug 3, 2013

Member

in this case, especially because the force variables are default false, it doesn't make sense to add any code to airline because users will only find out about these variables by looking at the help, and if they can find it in there, they can find t_Co and laststatus as well. perhaps the best option is to take most of the FAQ and add it into the documentation directly.

another option is to treat this like mappings in other plugins. we can define g:airline_overwrite_vimrc and default it to true, and it'll set up the terminal, colors, laststatus properly. and if someone doesn't like that behavior they can disable it and do everything manually. i think this would strike a good balance of ease of use and customization.

Member

bling commented Aug 3, 2013

in this case, especially because the force variables are default false, it doesn't make sense to add any code to airline because users will only find out about these variables by looking at the help, and if they can find it in there, they can find t_Co and laststatus as well. perhaps the best option is to take most of the FAQ and add it into the documentation directly.

another option is to treat this like mappings in other plugins. we can define g:airline_overwrite_vimrc and default it to true, and it'll set up the terminal, colors, laststatus properly. and if someone doesn't like that behavior they can disable it and do everything manually. i think this would strike a good balance of ease of use and customization.

@bling

This comment has been minimized.

Show comment
Hide comment
@bling

bling Aug 8, 2013

Member

@mattn, i've added the most common problems and solutions into the documentation. i still feel strongly that we should not be changing vim settings. hopefully if a user installs airline and sees something weird they will :h airline and find the answer. thanks again.

Member

bling commented Aug 8, 2013

@mattn, i've added the most common problems and solutions into the documentation. i still feel strongly that we should not be changing vim settings. hopefully if a user installs airline and sees something weird they will :h airline and find the answer. thanks again.

@bling bling closed this Aug 8, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment