tmux中的vim无法多彩高亮显示关键字
1. 问题描述
vim安装了interastingwords插件,在mobaxterm中的session可以正常显示多彩关键字,但是使用tmux登录session,只能显示两个颜色
2. 解决办法
这是因为tmux默认TERM没有用256color,那么每次运行tmux时指定color即可,TERM=screen-256color tmux
在~/.bash
rc
中设置别名:alias tmux="TERM=screen-256color tmux"
注意:
只需要做上面一件事就行了,不要在~/.tmux.conf
文件中加入这句话:set -g default-terminal "xterm-256color"
下面这个参考文档是不对的,否则会导致vim中的home和end不生效!!!
https://rdsconn.djicorp.com/portal/webclient/index.html#/desktop