256 vs 8 colors problem with tmux linux-consoles and xterm #60

Closed
drake01 opened this Issue Mar 5, 2012 · 8 comments

Comments

Projects
None yet
6 participants
@drake01
Contributor

drake01 commented Mar 5, 2012

I frequently use xterm as well as linux ttys (virtual linux consoles) with a new tmux-session running on each instance of them.

Native linux tty is unable to display 256 colors (AFAIK) and whereas xterm is..
But since both tty and xterm runs tmux session, $TERM is same for both.
I am unable to set t_Co value in vimrc.local, so that it would be able to distinguish tty and xterm terminal emulators with tmux running over them.

Although, I would love to use a tty with 256 color support (Question 1->) any suggestions about tty with 256 color support?? Currently checking out fbterm n a few others..

For now it would be great to able to identify terminal type and set t_Co correspondingly..
(Question2->)How should I do it??

I have been using spf13-vim for like a year or so. After this upgrade to 3.0 version, I am facing this sudden demand for 256 colors and vim is running slow too on xterm..
So (Question 3->) Does the additions done in 3.0 really bring things which previous versions lacked???

@wilonth

This comment has been minimized.

Show comment Hide comment
@wilonth

wilonth Mar 20, 2012

Contributor
Contributor

wilonth commented Mar 20, 2012

@jrobeson

This comment has been minimized.

Show comment Hide comment
@jrobeson

jrobeson Jul 1, 2014

Collaborator

is this still a problem for you @drake01 . I know more distros have enabled 256 colors by default since this issue was filed

Collaborator

jrobeson commented Jul 1, 2014

is this still a problem for you @drake01 . I know more distros have enabled 256 colors by default since this issue was filed

@drake01

This comment has been minimized.

Show comment Hide comment
@drake01

drake01 Aug 5, 2014

Contributor

Hey @jrobeson Apologize for taking time to reply back. This issue was about vim on Ubuntu 12.04. I can't say about other distributions or newer versions of Ubuntu, but with Ubuntu 12.04 using latest spf13-vim, the problem is still there. (it doesn't bother me now though!)

Contributor

drake01 commented Aug 5, 2014

Hey @jrobeson Apologize for taking time to reply back. This issue was about vim on Ubuntu 12.04. I can't say about other distributions or newer versions of Ubuntu, but with Ubuntu 12.04 using latest spf13-vim, the problem is still there. (it doesn't bother me now though!)

@jrobeson

This comment has been minimized.

Show comment Hide comment
@jrobeson

jrobeson Aug 5, 2014

Collaborator

you could try unbundling csapprox and see if that helps. We plan on removing it from the defaults in the near future.

Collaborator

jrobeson commented Aug 5, 2014

you could try unbundling csapprox and see if that helps. We plan on removing it from the defaults in the near future.

@spf13

This comment has been minimized.

Show comment Hide comment
@spf13

spf13 Aug 5, 2014

Owner

It has been removed. Need to rerun the installer then run :BundleClean!

Owner

spf13 commented Aug 5, 2014

It has been removed. Need to rerun the installer then run :BundleClean!

@bronzehedwick

This comment has been minimized.

Show comment Hide comment
@bronzehedwick

bronzehedwick Jan 5, 2015

Contributor

@drake01 does spf13's answer solve the problem?

Contributor

bronzehedwick commented Jan 5, 2015

@drake01 does spf13's answer solve the problem?

@jrobeson jrobeson added the needinfo label Jan 5, 2015

@jrobeson

This comment has been minimized.

Show comment Hide comment
@jrobeson

jrobeson Jun 3, 2015

Collaborator

closing due to lack of response

Collaborator

jrobeson commented Jun 3, 2015

closing due to lack of response

@jrobeson jrobeson closed this Jun 3, 2015

@j16180339887

This comment has been minimized.

Show comment Hide comment
@j16180339887

j16180339887 Dec 23, 2016

256 colors in xterm, put this in .bashrc

if [[ "$TERM" == "xterm"* ]]; then
  export TERM=xterm-256color
  exec tmux
fi

256 colors in ttys, put this in .bashrc

if [[ "$TERM" == "linux" ]]; then
  exec fbterm -- bash -c 'TERM=fbterm tmux'
fi

ps: I am not a spf13-vim user.

j16180339887 commented Dec 23, 2016

256 colors in xterm, put this in .bashrc

if [[ "$TERM" == "xterm"* ]]; then
  export TERM=xterm-256color
  exec tmux
fi

256 colors in ttys, put this in .bashrc

if [[ "$TERM" == "linux" ]]; then
  exec fbterm -- bash -c 'TERM=fbterm tmux'
fi

ps: I am not a spf13-vim user.

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