To modify the Debian default Nano editor for VIM

Source: Internet
Author: User

Some students in the Debian system Input VI or VIM of the command to edit the text, it is found that press the keyboard up and down the arrow keys, into the display ABCD character, the backspace bar also failed. Yes, that's right. The default editor for some Debian systems is not vim but the nano. Here are a few ways to solve the problem. There is only one alternative in Link Group Editor:/usr/bin/vim.tiny No to configure.

The first method runs the following command:


Update-alternatives--config Editor
The following interface appears:
There are 3 alternatives which provide ' editor '.
Selection Alternative
-----------------------------------------------
1/bin/ed
+ 2/bin/nano
* 3/usr/bin/vim.tiny

Press ENTER to keep the default[*], or type selection number:
Choose 3 to restart it.

The second ifUpdate-alternatives--config Editor appears after: There is only one alternative in Link Group Editor:/usr/bin/vim.tiny No to Co Nfigure. So the vim is there, we can delete the Nano editor directly, Vim will automatically become the default editor.
Apt-get Remove Nano

The third method:

Modify the BASH.BASHRC or. bashrc file in the ETC directory
Add a row

Export Editor=vim

The fourth method of omnipotence:

If the method is not good, may be your system itself is not installed vim, install a vim can be

Nano/etc/apt/sources.list

Remove all content add source as

Deb Http://ftp.debian.org/debian squeeze main contrib Non-free
Deb http://security.debian.org squeeze/updates main contrib Non-free

Ctrl+o #保存配置
Ctrl+x #退出
Apt-get Update #更新源
Apt-get Upgrade #更新系统

Reinstall VIM Editor: Apt-get install vim

Ok basically this kind of operation Vim can be used.
If the VIM is not installed, then from the first or the second method, the new appointment can be

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.