In Ubuntu, we usually see garbled characters when editing Chinese-coded documents using VIM, and even if the modified content is based on memory, this problem occurs. I encountered this problem and finally solved it. In fact, the method is very easy to edit. vimrc, so that the file can be added to the following two lines, this method is not effective for the operation at the # prompt. Let & amp; termencoding = & amp; encodingsetfileencodings = UTF-8, gbk, ucs-bom, cp
In Ubuntu, we usually see garbled characters when editing Chinese-coded documents using VIM, and even if the modified content is based on memory, this problem occurs. I encountered this problem and finally solved it. In fact, the method is very simple
Edit. vimrc
In this way, you can add the following two lines to the file. This method does not take effect for the operation at the # prompt.
Let & termencoding = & encoding
Set fileencodings = UTF-8, gbk, ucs-bom, cp936