diff options
| author | Your Name <you@example.com> | 2026-07-31 21:05:28 +0800 |
|---|---|---|
| committer | Your Name <you@example.com> | 2026-07-31 21:05:28 +0800 |
| commit | 686658e0596a9a8b7e697ea35a2e767817681ed8 (patch) | |
| tree | ea0e51d64d54c945268ebfb16df711cc177a2b5b | |
| parent | 8413ab8059618ed01eadf1a37460a33be8c7c650 (diff) | |
| -rw-r--r-- | core/tmux.conf | 4 | ||||
| -rwxr-xr-x | core/vim.sh | 7 |
2 files changed, 11 insertions, 0 deletions
diff --git a/core/tmux.conf b/core/tmux.conf index 94316d2..465641c 100644 --- a/core/tmux.conf +++ b/core/tmux.conf | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | # True-color support regardless of what TERM the outer terminal/distro sets | ||
| 2 | set -g default-terminal "tmux-256color" | ||
| 3 | set -ga terminal-overrides ",*256col*:Tc" | ||
| 4 | |||
| 1 | # Vi mode for copy | 5 | # Vi mode for copy |
| 2 | setw -g mode-keys vi | 6 | setw -g mode-keys vi |
| 3 | 7 | ||
diff --git a/core/vim.sh b/core/vim.sh index 2b2854e..8041e0e 100755 --- a/core/vim.sh +++ b/core/vim.sh | |||
| @@ -37,6 +37,13 @@ set laststatus=2 " permanent status bar | |||
| 37 | set statusline=%F " shows full file path | 37 | set statusline=%F " shows full file path |
| 38 | 38 | ||
| 39 | if (has("termguicolors")) | 39 | if (has("termguicolors")) |
| 40 | " tmux's terminfo entries (tmux-256color/screen-256color) don't define | ||
| 41 | " setrgbf/setrgbb, so vim has no termcap to build true-color escapes and | ||
| 42 | " silently emits none. Set them explicitly (standard vim+tmux fix). | ||
| 43 | if !empty($TMUX) | ||
| 44 | let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum" | ||
| 45 | let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum" | ||
| 46 | endif | ||
| 40 | set termguicolors | 47 | set termguicolors |
| 41 | endif | 48 | endif |
| 42 | 49 | ||
