Gvim's menu garbled solution, gvim garbled Solution
Gvim menu garbled solution:
(Garbled because the system internal code is not compatible, the system internal code including gb2312 gb18030 UTF-8 UTF-16 [unicode] and so on)
Generate file ~ /. Gvimrc
Add the following statement:
Set encoding = chinese
Set langmenu = zh_CN.GBK
Set imcmdline
Set guifont = "Serif 14"
Source $ VIMRUNTIME/delmenu. vim
Source $ VIMRUNTIME/menu. vim
You can solve the garbled problem after saving it.
==========================================================
View the file encoding:
: Echo & fileencoding
Vim has four options related to the character encoding method: encoding, fileencoding, fileencodings, and termencoding. for possible values of these options, see Vim online help: help encoding-names ), their meanings are as follows:
Encoding: the internal character encoding method used by Vim, including the buffer, menu text, and Message Text of Vim.
Fileencoding: The character encoding method of the file currently edited in Vim. When saving the file, Vim also saves the file as this encoding method (whether new or not ).
Fileencodings: When Vim is started, it detects the character encoding methods of the files to be opened one by one based on the character encoding methods listed in it, and sets fileencoding as the final character encoding method. Therefore, it is best to put the Unicode encoding method at the beginning of this list, and put latin1 in the latin1.
Termencoding: The character encoding method of the terminal (or Windows Console window) operated by Vim. This option is invalid for gVim in common GUI mode in Windows, but Vim in Console mode is the code page in Windows Console, and we usually do not need to change it.
It is best to use English menus and prompts, And you can skip the following menu and prompt information (part B, part C) settings.
If you use the English menu and prompt to install gvim, remove the options that support the local language.
Solve the vim file garbled, open the file garbled, And the menu prompts information garbled:
There are four options related to character encoding methods: encoding, fileencoding, fileencodings, and termencoding.
Modify. vimrc in linux (_ vimrc in win)
In windows, you can choose Edit> enable settings from the vim menu to open the _ vimrc file directly.
A, "set the file code format
Set encoding = UTF-8
Set termencoding = UTF-8
Set fileencoding = UTF-8
Set fileencodings = ucs-bom, UTF-8, chinese, cp936
B, "solve vim's menu garbled:
"Add the following command after setting the above Chinese characters in the _ vimrc file,
Source $ VIMRUNTIME/delmenu. vim
Source $ VIMRUNTIME/menu. vim
C, "vim prompts information garbled Solution
Language messages zh_CN.utf-8