Merge remote-tracking branch 'lenormf/contrib-tmux-truecolor'

This commit is contained in:
Maxime Coste 2018-03-20 05:28:53 +11:00
commit e444cd3937
2 changed files with 28 additions and 3 deletions

View File

@ -0,0 +1,4 @@
tmux-256color|tmux with 256 color and palette setting,
use=tmux-256color,
ccc,
initc=\E]4;%p1%d;rgb\:%p2%{255}%*%{1000}%/%2.2X/%p3%{255}%*%{1000}%/%2.2X/%p4%{255}%*%{1000}%/%2.2X\E\\,

View File

@ -45,9 +45,30 @@ This variable should be set by the terminal emulator, and not overridden with
an arbitrary value, otherwise it might interfere with general UI rendering on
the terminal's window.
Note that if you're using `tmux`, the proper -official- way to get Kakoune to
work is to add the following line to your `tmux` configuration file:
`set -sg default-terminal screen-256color`
== I'm using `tmux` and colors look weird
If you're using a tool that doesn't support "palette switching", colors will
still be slightly off: they are being rounded down to values supported by the
regular color palette by Kakoune. Fortunately, on recent versions of `tmux`
(>=2.6), you can work around that by using the following configuration
settings:
~/.tmux.conf
```
set -g default-terminal "tmux-256color"
set -ga terminal-overrides ",*col*:Tc"
```
Note: `\*col*` is a regular expression that matches your terminal's `$TERM`
value, modify it if necessary, e.g. `xterm-termite`.
Next, run the following command to create a local `terminfo` override:
```
$ tic /path/to/kakoune/contrib/tmux-256color.terminfo
```
Finally, quit all existing sessions (`tmux kill-server`), and restart `tmux`.
== Why does leaving insert mode take more than half a second in `tmux` ?