Ubuntu19安装vim

因为默认的vi打开文件后,输入命令i进入编辑模式,但使用方向键(上下左右)进行移动光标时不正常,会输入AB等的字母,删除键也不正常。
原因:ubuntu默认安装的是vim-tiny版本
解决方法: 安装vim-full版本
步骤:1)卸载vim-tiny, 命令:sudo apt-get remove vim-common
2)安装vim-full,命令:sudo apt-get install vim

使用sudo apt-get install vim命令安装报错:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package vim is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'vim' has no installation candidate

解决办法:用一下命令安装

sudo apt-get update && sudo apt-get install vim

如果安装下载失败,以下解决方式:

在Ubuntu系统下,使用sudo apt-get update有时会出现“W: 无法下载
http://cn.archive.ubuntu.com/ubuntu/… 校验和不符”,解决方法如下:sudo gedit
/etc/apt/sources.list,然后将
文件中http://cn.archive.ubuntu.com/ubuntu/替换为http://mirrors.163.com/ubuntu或http://mirrors.sohu.com/ubuntu,再次sudo
apt-get update。如若还出现类似的问题,建议多尝试更换,部分用163,部分用sohu。

https://blog.csdn.net/u011850815/article/details/43668263

猜你喜欢

转载自blog.csdn.net/u010411264/article/details/106798824
今日推荐