The ultimate solution for VIM and Gvim in Chinese garbled under windows

Source: Internet
Author: User

Article turned from: HTTP://WWW.LIUHUADONG.COM/ARCHIVES/68

The ultimate solution for vim and Gvim in Chinese garbled under windows
In Windows Vim's Chinese font display is not good, so we need to adjust the font display encoding utf-8, only in order to use beautiful Chinese. There may be a lot of Chinese garbled.
Such as:
File display garbled, menu garbled, right-click menu garbled, conlse output garbled, file association Right-click menu garbled and so on.
Online a lot of solutions, but I tried a lot, all appeared some weird garbled, forgotten how.
There is an easy way to solve the garbled problem: delete the lang directory under Vim. However, all menus can only be displayed in English.
So I had to find a way. After a long period of groping, summarize the following code can completely solve these problems.



"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" vim7.1在windows下的编码设置。By Huadong.Liu
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set encoding=utf-8
set fileencodings=utf-8,chinese,latin-1
if has("win32")
set fileencoding=chinese
else
set fileencoding=utf-8
endif
"解决菜单乱码
source $VIMRUNTIME/delmenu.vim
source $VIMRUNTIME/menu.vim
"解决consle输出乱码
language messages zh_CN.utf-8

The ultimate solution for VIM and Gvim in Chinese garbled under windows

Related Article

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.