On Windows 8, there are two types of garbled characters:
- The first is garbled characters
when starting the welcome interface.
- The second manifestation is (for example) when you perform a certain search and the search has reached the end, Vim will display the prompt message "It has reached the end" in the command bar, but most of the time the command bar appears as garbled characters.
In addition, my settings for file encoding in .vimrc are as follows: Complete .vimrc configuration
shell
set nocp set encoding=utf-8 set termencoding=utf-8 set fileencoding=utf-8 set fileencodings=ucs-bom,utf-8,big5,gb2312,latin1,cp936,gb18030 set ffs=unix,dos,mac set mousehide set showcmd
I set the mouse to be disabled in .vimrc, so the mouse has no effect, so how do I interact with the clipboard when copying and pasting?
My settings for this section are
It is normal under the command line or in gvim. Including the menu, the following prompts, etc. can all display Chinese correctly. You can try it. I am using win8.1 system.
Copy and paste, I use
"+y
和"+p
.How do I remember that after 7.4, Chinese will be supported without special settings
Interact with the clipboard if ms-win is enabled in vimrc. You can enter selection mode with v, Ctrl-c v. A more vi-friendly approach is to first use "+ or "* to select the system register, which is the clipboard, when y or p.
Not to mention other configurations, this sentence alone must have a big problem:
This setting is the encoding of the interface, and WINDOWS is definitely not UTF-8. Try removing this setting
CMD is GBK encoded by default. It’s not convenient for you to use
termencoding
设置为utf-8不乱码才怪了,解决的办法 …… 改termencoding
, so just use gvim.In addition, the problem of interoperability with the system clipboard can be configured
clipboard
. My configuration is copied from spf13-vim:For details, please refer to: http://vim.wikia.com/wiki/Accessing_the_system_clipboard