Add Ubuntu font encoding and vim and gedit settings

Source: Internet
Author: User

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!

 

 

 

 


 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.