spf13-vim icon indicating copy to clipboard operation
spf13-vim copied to clipboard

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

Open drake01 opened this issue 14 years ago • 8 comments

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???

drake01 avatar Mar 05 '12 14:03 drake01

This solves the problem: http://push.cx/2008/256-color-xterms-in-ubuntu

haiyamicode avatar Mar 20 '12 08:03 haiyamicode

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

ghost avatar Jul 01 '14 03:07 ghost

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!)

drake01 avatar Aug 05 '14 12:08 drake01

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

ghost avatar Aug 05 '14 12:08 ghost

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

spf13 avatar Aug 05 '14 14:08 spf13

@drake01 does spf13's answer solve the problem?

bronzehedwick avatar Jan 05 '15 17:01 bronzehedwick

closing due to lack of response

ghost avatar Jun 03 '15 03:06 ghost

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.

joeky888 avatar Dec 23 '16 14:12 joeky888