Vim,gvim's Utf-8 garbled solution
Use Vim when found that if you open the Utf-8 file will appear garbled problem, you can click Edit-> startup settings, in the configuration file to add the following configuration information can be:
First, you can try to modify the system code
Command:
The code is as follows |
Copy Code |
Set encoding=cp936 Set Termencoding=utf-8 Set Fileencoding=chinese Set fileencodings=ucs-bom,utf-8,chinese,cp936 Set Langmenu=zh_cn,utf-8 |
If you use VI when the message is garbled, you can switch to Vim editor.
In the Gvim click Edit-> startup settings, the software will automatically create a global configuration file
In the new file, enter:
The code is as follows |
Copy Code |
Set fileencodings=ucs-bom,utf-8,chinese,cp936 |
The default vim open file is a fixed size, and if you want to set it to automatic maximization, you also add the following configuration information to the file above:
Au guienter * Simalt ~x
If you use Vim in eclipse, you can use the Vrapper plug-in, the project address is: Http://vrapper.sourceforge.net, plugin installation address is: http://vrapper.sourceforge.net/ Update-site/stable. As a whole it's OK, there are other two plug-ins, you can refer to the following reference documentation