ssh中vim编辑没有颜色

操作系统:debian 7
首先检查终端是否支持256色

tput colors

返回 256 说明支持256色,然后把终端设置成256色模式

setenv TERM xterm-256color

或者

export TERM=xterm-256color

最后修改vim的配置文档

vim /etc/vim/vimrc

注:不同发行版可能位置不一样,可以通过

find / -name vimrc

找出配置文件的位置,然后在vimrc中最后一行加入

syntax on

保存退出即可

如果在这个过程中遇到了其它问题,欢迎在评论区留言,或者Google一下,也欢迎把具体的解决方法留在评论区,以供后来者参考

欢迎转载,不需注明出处,就说是你写的

参考

Subscribe
提醒
guest
2 评论
最旧
最新
内联反馈
查看所有评论
Typicalcat85
游客
Typicalcat85
2019年12月28日 上午4:10

When I originally commented I appear to have clicked on the -Notify me when new comments are added- checkbox and from now on whenever a comment is added I get four emails with the same comment. There has to be a way you are able to remove me from that service? Thank you!