bluz71 / vim-moonfly-colors

A dark charcoal theme for modern Neovim & classic Vim
MIT License
880 stars 64 forks source link

Kitty Tmux Color when do SSH #48

Closed huyhoang8398 closed 1 year ago

huyhoang8398 commented 1 year ago

Hi @bluz71,

This issue is not for neovim but since I like your colorscheme and also you provide a configuration for Kitty terminal I have a weird color when using SSH with vim and searching as the picture below: ( it's really hard to to see the text under the matching pattern ) image

My Tmux configuration is simple:

set -g default-terminal "tmux-256color" # for kitty

unbind C-b
set -g prefix `
bind-key ` last-window
bind-key e send-prefix

set -g status-position bottom
# Transparent background
set-option -g status-style bg=default
set -g status-fg "#bdbdbd"

set -g status-left ''
set -g status-right '%H:%M:%S'
set -g status-right-length 50
set -g status-left-length 20
setw -g mode-keys vi

setw -g window-status-current-format ' #I#[fg=#85dc85]:#[fg=#85dc85]#W#[fg=#ff5454]#F '
setw -g window-status-format ' #I#[fg=#bdbdbd]:#[fg=bdbdbd]#W#[fg=#bdbdbd]#F '

set-option -g history-limit 5000

# mouse behavior
set -g mouse on

set -s escape-time 10                     # faster command sequences
set -sg repeat-time 600                   # increase repeat timeout

bind-key -T copy-mode-vi 'v' send -X begin-selection     # Begin selection in copy mode.
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
huyhoang8398 commented 1 year ago

my workaround solution is :set background=dark whenever I enter vim in tmux ssh session

bluz71 commented 1 year ago

I already set background=dark here. You should not need to do that.

Does the issue happen outside of tmux? If not, then tmux and its configuration is likely your issue.

If issue still persists then your issue may well be TERM related, for kitty that should be TERM=xterm-kitty. Please make sure xterm-kitty terminfo entry is installed on the remote host in that case.

Does the issue happen with other terminals? Alacritty? (which is the terminal I use).

For now, I don't believe the issue is colorscheme related.

bluz71 commented 1 year ago

This is an issue you will need to explore and fix, from my testing of Alacritty-with-tmux-over-SSH-using-Vim, I can not replicate your issue.

I am an Alacritty user (not kitty), but I do not believe that is the issue. More likely, some form of true-color pass-through is your issue (or maybe terminfo related).

A couple tips:

Best of luck.

huyhoang8398 commented 1 year ago

you're the best, working great after adding your suggestion to vimrc and terminal-overrided for tmux

bluz71 commented 1 year ago

Excellent to hear that.