8

vim+tmux 真彩色256color配置

 3 years ago
source link: https://www.80shihua.com/archives/2735
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

vim+tmux 真彩色256color配置

vim是我们最喜爱的编辑器,tmux是我们最喜爱的终端管理器,它们的搭配可以让你的工作效率提升到难以想象的高度。默认情况下,linux的终端是8位的彩色配置,也就说它的颜色过于单一,然而其实大部分情况下它都是支持256位彩色配置的,下面我们就讲解下如何配置vim和tmux的真彩色256位。

查看终端当前彩色配置

tput colors

如果输出8位,表示我们需要设置成256,否则不需要调整。

修改我们的配置文件.bashrc或者.zshrc文件

export TERM="xterm-256color"

配置vim支持256

修改vim配置文件

set t_Co=256 "记住=号左右没有空格

配置tmux支持256

修改tmux配置文件,在家目录创建或者修改.tmux.conf

 set -g default-terminal "xterm-256color"

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK