You are not logged in.

#1 2012-10-15 21:36:35

kemmotar
Member
From: Ukraine
Registered: 2012-01-08
Posts: 43
Website

[SOLVED] Yet another tmux + vim problem

Hi
I use urxvt terminal emulator. And I try to configure tmux with 256 colors and corect looking vim. I tried many methods from forums and wikis and find that when I start tmux with this line:

TERM=screen-256color-bce tmux -2

it works with fine colors but keys F1 - F4 doesn't work in any app.
How to fix this, or are there any another methods to configure tmux?

Last edited by kemmotar (2012-10-17 22:02:54)

Offline

#2 2012-10-15 21:43:09

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,554
Website

Re: [SOLVED] Yet another tmux + vim problem

Don't set the TERM variable.  Ever.

You can, and should, set the default-terminal in your tmux.conf.

Try the following:

set -g default-terminal rxvt-unicode-256color
# or
#set -g default-terminal screen-256color-bce

"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2012-10-15 21:56:39

kemmotar
Member
From: Ukraine
Registered: 2012-01-08
Posts: 43
Website

Re: [SOLVED] Yet another tmux + vim problem

Thank you! You save my day!))

Offline

#4 2012-10-15 22:21:12

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Yet another tmux + vim problem

Please remember to mark the thread as solved.

Offline

#5 2012-10-17 07:58:47

bohoomil
Banned
Registered: 2010-09-04
Posts: 2,377
Website

Re: [SOLVED] Yet another tmux + vim problem

As a matter of fact,

man tmux wrote:

default-terminal terminal
   Set the default terminal for new windows created in this ses‐
   sion - the default value of the TERM environment variable.  For
   tmux to work correctly, this must be set to ‘screen’ or a de‐
   rivative of it.

If set otherwise, tmux can behave odd both with various ncurses and slang apps (like MC for that matter).


:: Registered Linux User No. 223384

:: github
:: infinality-bundle+fonts: good looking fonts made easy

Offline

#6 2012-10-17 15:25:46

kemmotar
Member
From: Ukraine
Registered: 2012-01-08
Posts: 43
Website

Re: [SOLVED] Yet another tmux + vim problem

Ok, I setup

set -g default-terminal rxvt-unicode-256color

and this work like a charm on my netbook and arch powered server. But when I connect to ubuntu powered server, I lost 256 colors in vim. I try set

set -g default-terminal screen-256color

but this makes font in vim bold. And yes, I use tmux -2. And I try different colorschemes in vim.

Offline

#7 2012-10-17 16:44:29

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED] Yet another tmux + vim problem

kemmotar wrote:

Ok, I setup

set -g default-terminal rxvt-unicode-256color

This is wrong.

kemmotar wrote:

I try set

set -g default-terminal screen-256color

but this makes font in vim bold. And yes, I use tmux -2. And I try different colorschemes in vim.

This suggests that something else is wrong with your setup; probably term-related. The quote bohoomil posted is where you should start from; ie a screen setting in .tmux.conf.

Then compare your various $TERM values in and outside tmux across your machines; check your shell initialization files for term settings and work with a single, vim 256 colour scheme until your nail down the discrepanc{y,ies}.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#8 2012-10-17 22:02:15

kemmotar
Member
From: Ukraine
Registered: 2012-01-08
Posts: 43
Website

Re: [SOLVED] Yet another tmux + vim problem

I remove termName from Xresources and make Ubuntu on server to recognize urxvt and now it ok!
Thank you guys for help! smile

Last edited by kemmotar (2012-10-17 22:02:29)

Offline

Board footer

Powered by FluxBB