How to view Chinese encoding documents in VIM in Ubuntu

Source: Internet
Author: User
In Ubuntu, we usually see garbled characters when editing Chinese-coded documents using VIM, and even if the modified content is based on memory, this problem occurs. I encountered this problem and finally solved it. In fact, the method is very easy to edit. vimrc, so that the file can be added to the following two lines, this method is not effective for the operation at the # prompt. Let & amp; termencoding = & amp; encodingsetfileencodings = UTF-8, gbk, ucs-bom, cp

In Ubuntu, we usually see garbled characters when editing Chinese-coded documents using VIM, and even if the modified content is based on memory, this problem occurs. I encountered this problem and finally solved it. In fact, the method is very simple

Edit. vimrc

In this way, you can add the following two lines to the file. This method does not take effect for the operation at the # prompt.

Let & termencoding = & encoding

Set fileencodings = UTF-8, gbk, ucs-bom, cp936

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.