Ubuntu 16.04在使用vim编辑shell脚本时关键字没有颜色

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Ubuntu 16.04在使用vim编辑shell脚本时关键字没有颜色相关的知识,希望对你有一定的参考价值。

设置语法高亮显示
1) 打开vimrc,添加以下语句来使得语法高亮显示:
syntax on
2) 如果此时语法还是没有高亮显示,那么在/etc目录下的profile文件中添加以下语句:
export TERM=xterm-color追问

vimrc具体在哪个目录下打开啊

参考技术A cd /etc/vim
nano vimrc

ubuntu10.10无法更新

W:Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/maverick/restricted/source/Sources.gz 500 Internal Server Error
, W:Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/maverick/main/source/Sources.gz 500 Internal Server Error
, W:Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/maverick/multiverse/source/Sources.gz 500 Internal Server Error
, W:Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/maverick/universe/source/Sources.gz 500 Internal Server Error
, W:Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/maverick/main/binary-i386/Packages.gz 500 Internal Server Error
, W:Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/maverick/restricted/binary-i386/Packages.gz 500 Internal Server Error
, W:Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/maverick/multiverse/binary-i386/Packages.gz 500 Internal Server Error
, W:Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/maverick/universe/binary-i386/Packages.gz 500 Internal Server Error
, W:Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/maverick-updates/restricted/source/Sources.gz 500 Internal Server Error
, W:Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/maverick-updates/main/source/Sources.gz 500 Internal Server Error
, W:Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/maverick-updates/multiverse/source/Sources.gz 500 Internal Server Error
, W:Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/maverick-updates/universe/source/Sources.gz 500 Internal Server Error
, W:Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/maverick-updates/main/binary-i386/Packages.gz 500 Internal Server Error
, W:Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/maverick-updates/restricted/binary-i386/Packages.gz 500 Internal Server Error
, W:Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/maverick-updates/multiverse/binary-i386/Packages.gz 500 Internal Server Error
, W:Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/maverick-updates/universe/binary-i386/Packages.gz 500 Internal Server Error
, E:Some index files failed to download, they have been ignored, or old ones used instead.
弹出 检查Internet连接
而且在安装是勾了跟新语言包也没有跟新
求教

手动更换apt-get的源列表配置

修改/etc/apt/sources.list文件内容为如下内容即可正常更新。

## Major bug fix updates produced after the final release of the
## distribution.

参考技术A 我的也出现了这个问题。网络连接完全没有问题,我想是不是服务器的问题啊。下面是我的出错信息:
错误 http://cn.archive.ubuntu.com maverick/main Sources
500 Internal Server Error
错误 http://cn.archive.ubuntu.com maverick/restricted Sources
500 Internal Server Error
错误 http://cn.archive.ubuntu.com maverick/universe Sources
500 Internal Server Error
错误 http://cn.archive.ubuntu.com maverick/multiverse Sources
500 Internal Server Error
错误 http://cn.archive.ubuntu.com maverick/main i386 Packages
500 Internal Server Error
错误 http://cn.archive.ubuntu.com maverick/restricted i386 Packages
500 Internal Server Error
错误 http://cn.archive.ubuntu.com maverick/universe i386 Packages
500 Internal Server Error
错误 http://cn.archive.ubuntu.com maverick/multiverse i386 Packages
500 Internal Server Error
错误 http://cn.archive.ubuntu.com maverick-updates/main Sources
500 Internal Server Error
错误 http://cn.archive.ubuntu.com maverick-updates/restricted Sources
500 Internal Server Error
错误 http://cn.archive.ubuntu.com maverick-updates/universe Sources
500 Internal Server Error
错误 http://cn.archive.ubuntu.com maverick-updates/multiverse Sources
500 Internal Server Error
错误 http://cn.archive.ubuntu.com maverick-updates/main i386 Packages
500 Internal Server Error
错误 http://cn.archive.ubuntu.com maverick-updates/restricted i386 Packages
500 Internal Server Error
错误 http://cn.archive.ubuntu.com maverick-updates/universe i386 Packages
500 Internal Server Error
错误 http://cn.archive.ubuntu.com maverick-updates/multiverse i386 Packages
500 Internal Server Error
W: 无法下载 http://cn.archive.ubuntu.com/ubuntu/dists/maverick/main/source/Sources.gz 500 Internal Server Error

W: 无法下载 http://cn.archive.ubuntu.com/ubuntu/dists/maverick/restricted/source/Sources.gz 500 Internal Server Error

W: 无法下载 http://cn.archive.ubuntu.com/ubuntu/dists/maverick/universe/source/Sources.gz 500 Internal Server Error

W: 无法下载 http://cn.archive.ubuntu.com/ubuntu/dists/maverick/multiverse/source/Sources.gz 500 Internal Server Error

W: 无法下载 http://cn.archive.ubuntu.com/ubuntu/dists/maverick/main/binary-i386/Packages.gz 500 Internal Server Error

W: 无法下载 http://cn.archive.ubuntu.com/ubuntu/dists/maverick/restricted/binary-i386/Packages.gz 500 Internal Server Error

W: 无法下载 http://cn.archive.ubuntu.com/ubuntu/dists/maverick/universe/binary-i386/Packages.gz 500 Internal Server Error

W: 无法下载 http://cn.archive.ubuntu.com/ubuntu/dists/maverick/multiverse/binary-i386/Packages.gz 500 Internal Server Error

W: 无法下载 http://cn.archive.ubuntu.com/ubuntu/dists/maverick-updates/main/source/Sources.gz 500 Internal Server Error

W: 无法下载 http://cn.archive.ubuntu.com/ubuntu/dists/maverick-updates/restricted/source/Sources.gz 500 Internal Server Error

W: 无法下载 http://cn.archive.ubuntu.com/ubuntu/dists/maverick-updates/universe/source/Sources.gz 500 Internal Server Error

W: 无法下载 http://cn.archive.ubuntu.com/ubuntu/dists/maverick-updates/multiverse/source/Sources.gz 500 Internal Server Error

W: 无法下载 http://cn.archive.ubuntu.com/ubuntu/dists/maverick-updates/main/binary-i386/Packages.gz 500 Internal Server Error

W: 无法下载 http://cn.archive.ubuntu.com/ubuntu/dists/maverick-updates/restricted/binary-i386/Packages.gz 500 Internal Server Error

W: 无法下载 http://cn.archive.ubuntu.com/ubuntu/dists/maverick-updates/universe/binary-i386/Packages.gz 500 Internal Server Error

W: 无法下载 http://cn.archive.ubuntu.com/ubuntu/dists/maverick-updates/multiverse/binary-i386/Packages.gz 500 Internal Server Error

E: 有一些索引文件不能下载,它们可能被忽略了,也可能转而使用了旧的索引文件。
OK了!!我修改了源,让它选择最佳下载服务器。我的是:http://ubuntu.srt.cn/ubuntu本回答被提问者采纳
参考技术B 首先你要判断你的计算机是否接入网络。能否打开例如www.baidu.com的网站。
如果不能上网当然就会出现“检测internet连接”的提示。
如果连不上网,什么都下载不下来再怎么更新也都是无效的。
所谓的500错误是不可恢复的网络连接。楼主还是先检查看看计算机是不是能上网再说吧。
如果能上网,那就到网上搜索 ubuntu 10.10 更新源 的关键词。网上有大量的更新教材可查。
参考技术C 源的问题,换个源吧,最好是用台湾源,比其它的源要快要新,而且速度也很快,一般我选台湾源里的前三个,速度都不错。 参考技术D 换个源试试

以上是关于Ubuntu 16.04在使用vim编辑shell脚本时关键字没有颜色的主要内容,如果未能解决你的问题,请参考以下文章

如何在ubuntu16.04创建12.04 gcc编译环境

ubuntu16.04下g++安装及使用

Ubuntu 16.04 64位安装YouCompleteMe

在Ubuntu16.04安装YouCompleteMe

Ubuntu16.04部署supervisor

ubuntu16.04如何双击执行shell文件?