Gvim Introduction (2)--solve various garbled problems

Source: Internet
Author: User

Let's talk about my OS configuration: Windows 8 64-bit.
Gvim is a version of 7.4.
In the initial configuration Gvim, there will be a lot of garbled situation. Menu garbled, output garbled, console garbled and so on, not solve the problem of garbled, the whole editor is a tuo shit, I can see how much hatred of garbled.
Garbled occurrences of the reason is nothing more than the conflict between the code, not support the like.
Before pasting out the code to solve garbled characters, first mention a few coding parts within the Gvim.

    • Internal coding Method: encoding
    • Terminal Encoding method: Termencoding
    • Current file encoding method: fileencoding
    • Support for open encoding: fileencodings

It's a good idea to get a better understanding of the options that need to be coded so that you can quickly pinpoint the cause of the problem when something goes wrong.

Post code:
"Gvim Internal code set ENCODING=UTF-8"Terminal codeSetTermencoding=Utf-8"encoding set fileencoding=utf-8 for the current edit file"Gvim opening a file that supports encodingSetFileencodings=UCs-bom, UTF-8, GBK,CP936,GB2312,BIG5,EUC-JP, EUC-kr, Latin1ifHas ("Win32")Setfileencoding=ChineseElse    Setfileencoding=Utf-8endif"Prevent special symbols from displaying set ambiwidth=double properly"Vim Menu garbled Solution source$VIMRUNTIME/delmenu.Vimsource$VIMRUNTIME/menu.Vim"Fix console garbled language messages Zh_cn.utf-8

Because in Vim, "is representative of the comments, so don't be too concerned about the color of the code here."
Generally put this piece of code into the _VIMRC configuration file, gvim the possibility of garbled is not too large.

Note: There is also a vim console will be garbled, the environment variable is not configured successfully in the case. For example, I configure VIM as a Python authoring environment. Python's path needs to be added to the system's environment variables. Need to be a small partner must pay attention to the configuration environment variables, or the console garbled can not find the reason.

Gvim Introduction (2)--solve various garbled problems

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.