rakr / vim-one

Adaptation of one-light and one-dark colorschemes for Vim
MIT License
1.98k stars 196 forks source link

Windows terminal and tmux don't work well #132

Closed Kaiser-Yang closed 3 months ago

Kaiser-Yang commented 3 months ago

Distro: wsl2 + ubuntu22.04

Terminal: Windows Terminal

Vim version: 9.0

Tmux version: 3.2a

What I have done (those below are in .vimrc):

" in .vimrc

if (has("termguicolors"))
    let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
    let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
    set termguicolors
endif
let g:one_allow_italics = 1
colorscheme one
set background=dark

Add true color for tmux:

# in .tmux.config

# Add truecolor support
set-option -ga terminal-overrides ",xterm-256color:Tc"
# Default terminal is 256 colors
set -g default-terminal "screen-256color"

What is the problem?

  1. The italic comments don't work in tmux: image And I find when I remove the let g:one_allow_italics = 1, the highlights of the comments disapear, so I think there must be something wrong with this configuration.

  2. The background dose not full the terminal fully (This happens when outside tmux): image

Kaiser-Yang commented 3 months ago

I've resolved the first problem.

I find that my $TERM is xterm-256color, so I set xterm-256color as my tmux's default terminal, the italics will work.

Kaiser-Yang commented 3 months ago

I fix the second one by removing the backgrounds