Some tips for using vim

Source: Internet
Author: User

Linux under the opening of some text files will encounter garbled, excerpt a method:

1)txt text character garbled

In terminal input gconf-editor, something like The Windows Registry is started

Go to catalogue apps->gedit-2->preferencea->encodings

Select the right auto_detected2 Point and select Edit Key

Then add gb18030 and move up to second place

2) withgeditAfter you finish editing the file, useVIOpen, a lot of Chinese characters in the comments are garbled due to thegeditbelow, the input method I use isFCITX,FCITXdefault isGBcoded, and myVimdefault isUtf-8(I checked it out, as ifgeditdefault is alsoUtf-8), so opening will be garbled. Modified the configuration file so thatVISupportGBthe code is good.

Modified . VIMRC:

Let &termencoding=&encoding

Set FILEENCODINGS=UTF-8,GBK (try to find only the Fileencodings parameter can be set)

Some tips for using vim

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.