Sudo Vim/var/lib/locales/supported. d/local
The premise is that you have installed Vim (it's nice to use)
Open this file and write the font you want to install.
Zh_CN.UTF-8 UTF-8en_US.UTF-8 UTF-8zh_CN.GBK gbkzh_cn.gb2312 gb2312
Run
Sudo locale-gen
Update and install. If the font "done" is displayed, it indicates that the installation is complete.
In this way, the above font is added to the Ubuntu system.
Then add font support for commonly used editors. Gedit and Vim are commonly used.
First, let's look at gedit, which is very simple.
Enter the password:Gconf-Editor
Call the gedit Configurator
On the left side, select:APP/gedit/preferences/encodings
Modify the key value auto-detected and add the added system font. If no prompt is displayed, write it directly. But I do not do this operation, and then the GBK font up, to the second, the first font I am a UTF-8, so on the line, it is estimated that there is a nearby look, not very clear.
Then there is VIM:
Open the vimrc file of vim and run whereis Vim in the/usr/share/Vim directory.
Add under the vimrc File
Set encoding = utf8
Set fileencodings = utf8, GBK
The above is the new file and default encoding. The following is the other font selected when the default font is enabled.
Windows is GBK and Ubuntu is UTF-8, which is basically enough. You can add another encoding.
There is also a Vim setting record:
Vim's initial custom settings:
Set nu (display row number) set nobackup (no backup file is generated) colorscheme blue (default topic) (the optional topic after installation is in/usr/share/Vim/vim72/colors) write only the file name, not the suffix!