About Vim's learning Plan, and the vim7.3 Editor's Chinese garbled solution

Source: Internet
Author: User

Some time ago the company project aimed at the company to use Linux, so, the next effort on Linux.

Seriously, Windows development and deployment habits, Linux is a little strange, but as a developer, Siege Lion, Linux How can you miss it? So, under a lot of effort, the project has been deployed successfully, which summarizes some of the things that will later have the opportunity to post.

Referring to Linux, the keyboard command is sure to bypass, no one will be silly to install a GUI version of the Linux system, and then use the mouse to click, I am afraid people will be laughed at. Of course, the reference to the command, the text editor under Linux is certainly a need to work hard, but in view of the normal working environment, not always in the Linux under the practice, so installed a vim editor, starting from the novice to practice it, a steady, kung fu certainly will not be negative.

Vim Editor is installed, but the document opened in Chinese incredibly garbled, degree Niang to help, so posted the following article, really can solve the problem.

The Chinese garbled solution in the document:

The solution is as follows:

Scenario 1

I succeeded in this way!

At the front of the C:\Program FILES\VIM\_VIMRC, add the following two lines, and if you do not have this file, build one.

Let &termencoding=&encoding
Set fileencodings=utf-8,gbk,ucs-bom,cp936

Remember to save Oh, and then use VIM to open a look, UTF8 and GB2312 are no problem.

Scenario 2

I failed with this scheme!

Chinese Simplified

If you want to use Vim to edit utf-8 format files in the case of using vim under the Simplified Chinese Windows , you will need to have the VIM profile (vim7.2 if after the default installation, the configuration file is the vim directory under the "_vimrc" file, with Notepad or other editor open it can be edited) set the following four options:

Set Encoding=utf-8
Set termencoding=gb2312
Set Fileencodings=ucs-bom,utf-8,chinese
If has ("Win32″")
Set Fileencoding=chinese
Else
Set Fileencoding=utf8
endif
Set ambiwidth=double
SOURCE $VIMRUNTIME/delmenu.vim
SOURCE $VIMRUNTIME/menu.vim
Language messages ZH_CN. UTF-8

Add it to the front of the _VIMRC file.

Chinese Traditional

To send a configuration under a traditional system:

Set Encoding=utf-8
Set Termencoding=big5
Set Fileencodings=ucs-bom,utf-8,chinese
If has ("Win32″")
Set Fileencoding=chinese
Else
Set Fileencoding=utf8
endif
Set ambiwidth=double
SOURCE $VIMRUNTIME/delmenu.vim
SOURCE $VIMRUNTIME/menu.vim
Language messages ZH_TW. UTF-8

By the way, the last source, thank you, non-plagiarism, but this source I do not say anything.

Http://blog.sina.com.cn/s/blog_9d55a77f01018x2w.html

About Vim's learning Plan, and the vim7.3 Editor's Chinese garbled solution

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.