Vim在windows下乱码问题(更改GB2312为utf-8)来解决
时间:2022-04-19 09:10:14
Vim默认的编码是GB2312的,没utf-8给我们选,所以得我们自己来配置,这也可能是导致乱码的最主要问题吧,具体配置如下,感兴趣的朋友可以参考下哈Vim默认的编码是GB2312的,没utf-8给我们选,所以得我们自己来配置:
具体配置如下:
打开vim安装目录下的_vimrc,在头部加上几句配置语句就能搞定:
复制代码代码如下:
//设置默认编码
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
//解决console输出乱码
language messages zh_CN.utf-8
//再者,强烈建议大家改一下它的配色,默认的白色太过刺眼
//同样的,加一句配置就好(这个desert沙漠主题是看着最舒服的了,不喜欢的自己换)
colorscheme desert
//其他一些有用的
//添加行号
:set number
标签:Vim,乱码,GB2312
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
Word2016文字的边框怎么设置 Word2016文字设置框框教程
2022-07-13 06:44:52
![](https://img.aspxhome.com/file/2023/6/24676_0s.jpg)
Win11升级22449.1000版本卡在49%怎么办?
2023-04-28 05:31:22
![](https://img.aspxhome.com/file/2023/27/a237773_0s.jpg)
Win7系统家长控制无法打开不能控制孩子上网时间
2022-11-19 02:55:19
![](https://img.aspxhome.com/file/2023/29/a252451_0s.jpg)
MAC如何删除废纸篓中单个文件或文件夹
2022-06-19 02:53:05
![](https://img.aspxhome.com/file/2023/0/a216680_0s.jpg)
开会做汇报是否需要好的Excel图表?
2022-06-28 22:12:21
![](https://img.aspxhome.com/file/2023/5/a141275_0s.jpg)
邮件合并应用让Word批量打印标签
2023-06-16 12:51:13
WPS表格中怎么快速复制公式
2023-11-07 03:03:15
Excel合并单元格进行求和和计数 不规则表格进行求和!
2023-09-25 20:44:28
![](https://img.aspxhome.com/file/2023/5/a143265_0s.gif)
excel表格打印预览显示不全如何解决
2023-11-19 20:48:45
Apple 家人共享功能是什么,有什么好处?
2022-08-29 17:31:55
![](https://img.aspxhome.com/file/2023/4/a198964_0s.png)
WPS word下划线怎么打
2022-08-15 03:56:44
![](https://img.aspxhome.com/file/2023/7/a186237_0s.jpg)
跟密码说拜拜!Win10全新登陆方式Windows Hello详解
2022-12-11 13:19:57
![](https://img.aspxhome.com/file/2023/29/a251388_0s.jpg)
word怎么另起一段
2022-01-25 22:37:38
![](https://img.aspxhome.com/file/2023/8/35098_0s.png)
windows10专业版系统重装教程
2022-08-23 07:17:00
![](https://img.aspxhome.com/file/2023/25/a217986_0s.png)
怎样打印Word2013文档中的XML标记
2023-12-13 12:58:29
![](https://img.aspxhome.com/file/2023/0/21120_0s.jpg)
如何在Excel中查找重复条目
2023-04-05 18:36:33
![](https://img.aspxhome.com/file/2023/7/a156967_0s.jpg)
如何美化excel表格
2022-04-02 08:38:40
Excel中的打印知识技巧大汇集
2023-07-01 02:57:29
word怎么邮件合并成信函
2023-03-17 18:00:54
![](https://img.aspxhome.com/file/2023/6/35436_0s.png)
excel中mid函数的使用方法
2022-06-10 14:15:56