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

Highlighting style not working in tmux. #229

Closed
mtbehisseste opened this Issue Apr 4, 2017 · 7 comments

Comments

Projects
None yet
6 participants
@mtbehisseste

mtbehisseste commented Apr 4, 2017

Everything is ok when using zsh. The highlighting style of autosuggestions(I changed it to fg=240) works. But when I use tmux, the color of the suggestions did not change to what I expected(fg=240). The color is exactly the origin command line color. Other functions like right arrow key to complete or command line suggestions work well. There's only problem about highlighting styles in tmux. Any suggestion?

@philippotto

This comment has been minimized.

philippotto commented Apr 8, 2017

I'm experiencing the same issue. I've enabled set -g default-terminal screen-256color in .tmux.conf, but this doesn't help. When tmux is closed, everthing works fine.

@ericfreese ericfreese added the support label Apr 18, 2017

@Cdok

This comment has been minimized.

Cdok commented Apr 21, 2017

Also experiencing this issue

tmux suggestion color

screen shot 2017-04-21 at 10 45 00 am

outside of tmux session

screen shot 2017-04-21 at 10 45 10 am

Note that issue is also occurring on the git zsh plugin inside of tmux

@mojidong

This comment has been minimized.

mojidong commented May 11, 2017

tmux default TERM is screen:

$ env | grep TERM
TERM=screen

You can solve it like this:

echo  "export TERM=xterm-256color" >> ~/.zshrc
exec zsh
@mojidong

This comment has been minimized.

mojidong commented May 13, 2017

If you use MacOS iTerm2, you may need to modify the terminal type.

MacOS iTerm2:

Preferences -> Profile -> Terminal -> Report Terminal Type :  xterm-256color
@ericfreese

This comment has been minimized.

Member

ericfreese commented Aug 14, 2017

Sounds like this is solved. Thanks everyone 👍

@ericfreese ericfreese closed this Aug 14, 2017

@ericfreese

This comment has been minimized.

Member

ericfreese commented Aug 29, 2017

Just came across another relevant link. See the tmux FAQ: https://github.com/tmux/tmux/wiki/FAQ#how-do-i-use-a-256-colour-terminal

@ZhouShengsheng

This comment has been minimized.

ZhouShengsheng commented Sep 1, 2018

Setting the default term to xterm-256color in your .tmux.conf does the trick:

# Set default term to xterm
set -g default-terminal xterm-256color
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment