欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

vim 相关

程序员文章站 2022-07-04 12:03:46
...
1、中文显示乱码
在~/.vimrc 文件中,加入以下内容:
引用
set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936
   set termencoding=utf-8
   set encoding=utf-8

参考自:http://www.cnblogs.com/joeyupdo/archive/2013/03/03/2941737.html


2、保存readonly的文件
:w !sudo tee %

https://*.com/questions/28635647/how-can-i-save-a-file-i-opened-in-vim-as-the-wrong-user
相关标签: vim