When Vim is used, Chinese characters are garbled. In this case, we can modify the vimrc file to solve the problem!
First, you need to find out where vimrc is located. In general, in Linux
Linux:/usr/share/Vim/vimrc in Windows, it should be in the vim installation directory
Windows: C: \ Program Files \ Vim \ vimrc I am currently using windows7, the path is displayed
C: \ Program Files \ Vim \ _ vimrc
This is all about global settings. After opening the vimrc file, you only need to add the following code at the end of the file:
Set fileencodings = UTF-8, gb2312, GBK, gb18030
Set termencoding = UTF-8
Set fileformats = Unix
Set encoding = PRC
In this way, your vim Chinese garbled problem is solved!
Note that in Windows 7 and Vista, you can use Vim to open the vimrc file directly due to the administrator privilege of the enhanced version, and the modifications you have made cannot be saved! Even if you are using WQ! Command! A simple method is to start Vim with the administrator privilege in the beginning, and then use Vim to open the vimrc file for modification!