1. Vim
打开vim的配置文件,位置在/etc/vim/vimrc在其中加入
- setfileencodings=utf-8,gb2312,gbk,gb18030
- settermencoding=utf-8
- setencoding=prc
设置tab键为4个空格:
vim /etc/vimrc
1 |
set ts=4 |
2 | expandtab |
3 | autoindent |
2. gedit
在终端中输入如下命令,然后重新打开gedit即可:
gsettings setorg.gnome.gedit.preferences.encodings auto-detected "['GB18030','GB2312','GBK','UTF-8','BIG5','CURRENT','UTF-16']"
gsettings setorg.gnome.gedit.preferences.encodings shown-in-menu "['GB18030','UTF-16']"