Ubutu vim不好用的解决办法

本文提供了解决Ubuntu系统中vim编辑器难以使用的解决方案,包括卸载旧版vi、安装新版本vim以及调整配置文件以解决方向键问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

[原]ubuntu 下vim不好用 怎么办

2014-3-8阅读1222 评论0

我使用 ubuntu 自带的vi 编辑器 感觉超难使用,解决方法如下:

1 卸掉旧版的vi,输入以下命令: sudo apt-get remove vim-common

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  ubuntu-minimal vim-common vim-tiny
0 upgraded, 0 newly installed, 3 to remove and 321 not upgraded.
After this operation, 1,212 kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 155432 files and directories currently installed.)
Removing ubuntu-minimal ...
Removing vim-tiny ...
update-alternatives: using /usr/bin/see to provide /usr/bin/view (view) in auto mode
Removing vim-common ...
Processing triggers for mime-support ...
Processing triggers for man-db ...


ok ,成功删除。

 2 安装 新版本的vim sudo apt-get install vim


aries@ubuntu:~$ sudo apt-get install vim
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  vim-common vim-runtime
Suggested packages:
  ctags vim-doc vim-scripts
The following NEW packages will be installed:
  vim vim-common vim-runtime
0 upgraded, 3 newly installed, 0 to remove and 321 not upgraded.
Need to get 5,508 kB of archives.
After this operation, 25.3 MB of additional disk space will be used.
Do you want to continue [Y/n]? y  //安装


ok ! 完了以后 vi 使用起来感觉都不一样!


编辑/etc/vim/vimrc.tiny

由于/etc/vim/vimrc.tiny的拥有者是root用户,所以要在root的权限下对这个文件进行修改。很简单,这个文件里面的倒数第二句话是“set compatible”,将“compatible”改成“nocompatible”非兼容模式就可以解决方向键变ABCD的问题了。



原创:

http://m.blog.youkuaiyun.com/blog/u010236550/20765843

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值