tmux: fix truecolor in tmux
So story time, I discovered :checkhealth in Neovim, and it gave a fairly decent explanation of how to fix terminal truecolor support. Namely, use `tmux-256color` (or `screen-256color`) for the default-terminal, then force truecolor (Tc) in the terminal-overrides It also mentioned that `focus-events` needs to be enabled for n/vim to detect changes to its buffers. Notably, this allows vim to rerender changed content when switching into a tmux pane containing a vim session.
This commit is contained in:
parent
138e66f245
commit
c815f5aa25
|
@ -27,10 +27,14 @@ set -g status-right '#T #[fg=yellow,bold]#(uptime -p)#[default] #[fg=cyan,bold]%
|
|||
set -g set-titles on
|
||||
setw -g aggressive-resize on
|
||||
setw -g monitor-activity on
|
||||
# The following three makes italics work in tmux
|
||||
|
||||
set -g xterm-keys on
|
||||
set -g default-terminal "xterm-256color"
|
||||
set -as terminal-overrides ',xterm*:sitm=\E[3m'
|
||||
# Correctly set up terminal for truecolor support
|
||||
set -g default-terminal "tmux-256color"
|
||||
set -ga terminal-overrides ',xterm-256color:Tc'
|
||||
|
||||
# Fix :h 'autoread' in Vim
|
||||
set -g focus-events on
|
||||
|
||||
# Refresh status line every 5 seconds
|
||||
set -g status-interval 5
|
||||
|
|
Loading…
Reference in New Issue