基于MT7688模块的开发笔记5——解决Ubuntu vi 上下左右变ABCD问题

本文介绍了解决Ubuntu系统中vi编辑器上下左右键显示为ABCD的问题,通过移除旧的vim-common包并安装新的vim编辑器来恢复正常功能。

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

我用的Ubuntu12.4.2版本但是在使用的过程中发现vi编辑器中的上下左右四个按键会变成ABCD,这样使用起来不方便,当然你也可以重新安装一个VIM编辑工具,使用是没有问题的。

一、移除vim-common

root@openwrt:~/MT7688# 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 524 not upgraded.
After this operation, 1,154 kB disk space will be freed.
Do you want to continue [Y/n]? Y
(Reading database ... 149098 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 man-db ...

二、安装vim

root@openwrt:~/MT7688# 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 524 not upgraded.
Need to get 7,341 kB of archives.
After this operation, 25.1 MB of additional disk space will be used.
Do you want to continue [Y/n]? Y
WARNING: The following packages cannot be authenticated!
  vim-common vim-runtime vim
Install these packages without verification [y/N]? Y
Get:1 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main vim-common i386 2:7.3.429-2ubuntu2.1 [85.8 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main vim-runtime all 2:7.3.429-2ubuntu2.1 [6,277 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main vim i386 2:7.3.429-2ubuntu2.1 [979 kB]
Fetched 7,341 kB in 51s (144 kB/s)                                             
Selecting previously unselected package vim-common.
(Reading database ... 149043 files and directories currently installed.)
Unpacking vim-common (from .../vim-common_2%3a7.3.429-2ubuntu2.1_i386.deb) ...
Selecting previously unselected package vim-runtime.
Unpacking vim-runtime (from .../vim-runtime_2%3a7.3.429-2ubuntu2.1_all.deb) ...
Adding 'diversion of /usr/share/vim/vim73/doc/help.txt to /usr/share/vim/vim73/doc/help.txt.vim-tiny by vim-runtime'
Adding 'diversion of /usr/share/vim/vim73/doc/tags to /usr/share/vim/vim73/doc/tags.vim-tiny by vim-runtime'
Selecting previously unselected package vim.
Unpacking vim (from .../vim_2%3a7.3.429-2ubuntu2.1_i386.deb) ...
Processing triggers for man-db ...
Setting up vim-common (2:7.3.429-2ubuntu2.1) ...
Setting up vim-runtime (2:7.3.429-2ubuntu2.1) ...
Processing /usr/share/vim/addons/doc
Setting up vim (2:7.3.429-2ubuntu2.1) ...
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vim (vim) in auto mode.
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vimdiff (vimdiff) in auto mode.
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rvim (rvim) in auto mode.
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rview (rview) in auto mode.
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vi (vi) in auto mode.
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/view (view) in auto mode.
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/ex (ex) in auto mode.
root@openwrt:~/MT7688# 

三、现在可以正常使用vi和vim工具了

root@openwrt:~/MT7688# vim Hello.c 
root@openwrt:~/MT7688# vi Hello.c 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值