You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
如何验证 true color 是否开启成功?验证 vim 的话,在 vim 里用 :terminal 命令打开自带的终端,执行下面的命令1:
awk 'BEGIN{
s="/\\/\\/\\/\\/\\"; s=s s s s s s s s;
for (colnum = 0; colnum<77; colnum++) {
r = 255-(colnum*255/76);
g = (colnum*510/76);
b = (colnum*255/76);
if (g>255) g = 510-g;
printf "\033[48;2;%d;%d;%dm", r,g,b;
printf "\033[38;2;%d;%d;%dm", 255-r,255-g,255-b;
printf "%s\033[0m", substr(s,colnum+1,1);
}
printf "\n";
}'
在 vim 和 tmux 中开启真彩色,可以获得更好的视觉体验。
在 vimrc 中加入下面的设置:
Tmux 需要在
.tmux.conf
配置文件里添加下面的内容:退出所有的 tmux,再重新打开,就可以了。
如何验证 true color 是否开启成功?验证 vim 的话,在 vim 里用
:terminal
命令打开自带的终端,执行下面的命令1:验证 tmux,则打开 tmux 后直接在命令行执行上面的命令。
如果显示的是连续的颜色,则已经开启成功;
如果是间断的颜色,则设置失败。
参考链接
https://lotabout.me/2018/true-color-for-tmux-and-vim/
https://jdhao.github.io/2018/10/19/tmux_nvim_true_color/
__
The text was updated successfully, but these errors were encountered: