Emacs Getting Started: Set the font

Source: Internet
Author: User

After the basic configuration of Emacs was successful, I immediately found the default font, Courier New, unpleasant. Although Courier New is a mono-space font, it still cannot meet programming needs. First, its 0 and O are not easy to distinguish. Second, (it is not easy to distinguish from. The third is that 1 and l are not easy to distinguish (for the sake of 1 and L when I was using PROLOG, didn't I spend the night ?). Fortunately, looking for a font is like this kind of physical activity, there was a tie pole geek early, blog fast gunner Jeff AtwoodDai Lao. I love pragmata most. Unfortunately, the treasures of the rich room, beauty into the giants. Art is always the enemy of money. Pragmata costs 90 euros. I have to leave and select proggy clean TT. Proggy clean is a bitmap-based font, with only 12 characters as clear as possible. If our screen resolution is too high, it cannot be used. However, my resolution is 1600x1200, And the font 12 is on Emacs. We can compare the results:

Courier New: the effect of proggy clean: it is easy to install a new font. Just extract the font file to C:/Windows/fonts. The antelope book says you can shift + left mouse button to bring up the font menu. Sure enough: I don't know whether it's the antelope book, or I didn't read it carefully, so setting the font is only valid for the current session. After Emacs is restarted, the font is restored to Courier New. After Google review, find the solution:
    1. Use the above method to select proggycleantt.
    2. M-: Call up the interpreter in mini-buffer.
    3. After "Eval:", enter (frame-parameter nil 'font) and press Enter.
    4. The current font name should appear in mini-buffer. Because proggcleantt is selected, the font name I get is-outline-ProggyCleanTT-normal-r-normal-normal-16-120-96-96-c-*-iso8859-1
    5. Open the Emacs configuration file. Generally ~ /. Emacs. Add this sentence: (set-default-font "font name "). For example (set-default-font "-outline-ProggyCleanTT-normal-r-normal-normal-16-120-96-96-c-*-iso8859-1 ").
    6. Now the default font is permanently saved.

P.s., emacs comes with the python. El function in Taiyuan. Or use the python-mode.el In the python installation package. How can I use a mode without electric mode? Unfortunately, Python. El and python-mode.el use the python-mode function to activate the python mode. So this small revolution encountered a new problem: how can we remove the default python. El Association of Emacs? Now, if I open a python file, the python-mode in Python. El is activated. I have to manually execute M-x Python-mode, although my initial file has been associated with the. py file.

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.