Change the Ubuntu Default Editor to Vim.

Source: Internet
Author: User
Generally, the default editor in Ubuntu is nano. You can directly edit a file to enable nano by default. For example, when "crontab-e" is input, the nano editor is opened by default. If anyone familiar with VIM wants the default editor to use vim, we need to modify the default editor of Ubuntu. You can modify the default Ubuntu editor by entering echoexportEDITOR =/usr/bin/v on the terminal.

Generally, the default editor in Ubuntu is nano. You can directly edit a file to enable nano by default. For example, when "crontab-e" is input, the nano editor is opened by default.

If anyone familiar with VIM wants the default editor to use vim, we need to modify the default editor of Ubuntu.

There are three methods to modify the Ubuntu Default Editor:

1. Enter the following directly on the terminal:

Echo export EDITOR =/usr/bin/vim> ~ /. Bashrc

2. Use the system management tool update-alternatives to modify

Enter at the terminal:

Update-alternatives -- config editor

Select vim. basic.

3. If only the nano and vim editors are left in the system, if we delete the nano completely, vim is selected as the default editor by default.

Enter the command to delete the nano editor on the terminal:

Sudo apt-get remove nano

After the modification is complete, enter:

Crontab-e

Let's see if the vim editor is popular.

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.