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