ubuntu22.04 vim中文乱码

安装中文字体

sudo apt-get install ttf-wqy-microhei  #文泉驿-微米黑
sudo apt-get install ttf-wqy-zenhei  #文泉驿-正黑
sudo apt-get install xfonts-wqy #文泉驿-点阵宋体

vimrc

# cat /etc/vim/vimrc
....

set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936
set termencoding=utf-8
set encoding=utf-8

 

posted @ 2023-04-10 12:55  小吉猫  阅读(384)  评论(0编辑  收藏  举报