Garbled characters appear after saving and exiting Vim

Source: Internet
Author: User

 At the beginning, after Ubuntu is installed, garbled characters will be displayed after you exit with vim. This is because Vim of Ubuntu is linked to/usr/bin/gnome by default, this is different from the usual vim, so if we need to use the usual vim and solve the garbled problem after Vim exits, we must link Vim to our commonly used vim. basic, the steps are as follows:
1. Use apt-get to install the vim package. The vim-gnome package is installed by default. The command is as follows:
Sudo apt-Get install Vim
2. After the vim package is installed, there will be a Vim. Basic file under/usr/bin/. Then, we need to link Vim to this file. The command is as follows:

Sudo Update-alternatives -- config vi

3. select the option to be linked
4. after the selection, click vim and run the following command:
sudo Update-alternatives -- config Vim
5. in this way, the vim link will not be garbled.

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.