Here is how I handle this,

*make sure you have vim and colorls packages installed, then for your .vimrc
do something like this:*

syntax on
set nocompatible
set autoindent
set smartindent
set tabstop=4
set shiftwidth=4
set showmatch
set vb t_vb=
set ruler
set incsearch
set number

*put this in your .profile:*

# $OpenBSD: dot.profile,v 1.4 2005/02/16 06:56:57 jrecords Exp $
#
# sh/ksh initialization

alias ls='colorls -G'
alias vi=vim

PATH=$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin:/usr/games:.
export PATH HOME TERM=xterm-256color

tmux attach || tmux new


#if you don't use vim , this might not really apply but you'll get colors
when you type ls, which is probably what you want.

Jim






On Wed, Feb 17, 2010 at 2:38 PM, frantisek holop <min...@obiit.org> wrote:

> hi there,
>
> i am trying to make tmux use 256 colors.
>
> i have found this:
>
> http://www.mail-archive.com/debian-bugs-d...@lists.debian.org/msg707066.html
>
> i have done step 2:
>
> $ xterm
> $ echo TERM
> $ TERM=xterm-256color
> $ tput colors
> 256
>
> but it is not clear to me how can i do step 1.
> what is the proper way to:
>
> "1) Set TERM=screen-256color inside so that applications INSIDE tmux know
> that
> it supports 256 colours, you can do this however you like but
> default-terminal
> is usually easiest."
>
> actually the man page states, somewhat misleadingly, that:
>
>             The TERM environment variable must be set to ``screen'' for all
>             programs running inside tmux.  New windows will automatically
>             have ``TERM=screen'' added to their environment, but care must
> be
>             taken not to reset this in shell start-up files.
>
> what i have done in the end is to put
> TERM=screen-256color
> in my .kshrc that is referenced also by .profile's ENV
> but it doesn't feel 100% right.
>
> -f
> --
> there are 10 types of people: those that do binary, and those that don't.

Reply via email to