Gvim's menu garbled solution, gvim garbled Solution

Source: Internet
Author: User

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

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.