解决方案
1.更新源
如果出现报错:
Some index files failed to download, they have been ignored, or old ones used instead.”
只需要更改一下sources.list文件即可,如下
添加文件内容deb http://mirrors.ustc.edu.cn/Ubuntu/ xenial main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/Ubuntu/ xenial-security main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/Ubuntu/ xenial-updates main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/Ubuntu/ xenial-proposed main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/Ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/Ubuntu/ xenial main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/Ubuntu/ xenial-security main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/Ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/Ubuntu/ xenial-proposed main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/Ubuntu/ xenial-backports main restricted universe multiverse
2.安装vim
接下来就可以用vim了。