ITeye博客

vim 相关

cherishLC · 2018-03-22 15:29 · linux · vim · 非技术 · vim · Markdown

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://stackoverflow.com/questions/28635647/how-can-i-save-a-file-i-opened-in-vim-as-the-wrong-user

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。