ssh中vim编辑没有颜色
本文上次更新于 1755 天前,其内容可能已经过时,如果文章内容或图片资源失效,请留言反馈,我会及时处理,谢谢!
操作系统: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一下,也欢迎把具体的解决方法留在评论区,以供后来者参考
欢迎转载,不需注明出处,就说是你写的
参考
- https://blog.csdn.net/cs_ing/article/details/8728769
- https://segmentfault.com/q/1010000004608764
- http://www.contrib.andrew.cmu.edu/~minlix/wordpress/?p=185
- 鸟哥的Linux私房菜基础学习篇(第三版)–vim程序编辑器
如果在这个过程中遇到了其它问题,欢迎在评论区留言,如果你已解决,也欢迎把具体的解决方法留在评论区,以供后来者参考
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!
@Typicalcat85 Actually, my website doesn’t have the checkbox — ” Notify me when new comments are added ” , and for some reason,My website doesn’t send emails to anybody. I think the reason why you may get four emails with the same comment is that you wrote a lot of spam comments on other website. At least on my website,you have wrote eight spam comments.