The ultimate solution for vim and Gvim in Chinese garbled in Windows

Source: Internet
Author: User

Test success, perfect solution.

Just change this file _VIMRC in the Vim folder below.

Come on, tart. It's very powerful!

Set Encoding=utf-8set fileencodings=utf-8,chinese,latin-1if has ("Win32") set Fileencoding=chineseelseset Fileencoding=utf-8endif "fix menu garbled source $VIMRUNTIME/delmenu.vimsource $VIMRUNTIME/menu.vim" fix consle output garbled language Messages Zh_cn.utf-8

Suppose you also adjust the font size and then add the following:

If has ("Win32")    set Guifont=courier_new:h15:cansiendif

Let's say you want to set the background color by default:

ColorScheme  Slate


This configuration file has been tried by _VIMRC itself.
When you open the file, you go back to your last edit position.
If have ("Autocmd")   autocmd bufread *.txt set tw=78 autocmd   bufreadpost *      \ If line ("' \" ") > 0 && Lin E ("' \" ") <= Line (" $ ") |      \   exe "normal g ' \" "|      \ endifendif


Suppose you want to set the syntax Gaoliangga this:

ColorScheme  Slatesyntax Enable


The above configuration is added in the _VIMRC file in the face of the practice of knowledge ah!


The ultimate solution for vim and Gvim in Chinese garbled in 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.