请先登录
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
我用的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
|