Tip #158: Using Computer Modern TT as gvim font (Win32)
tip karma |
Rating 10/6, Viewed by 1593
|
created: |
|
November 8, 2001 12:59 |
|
complexity: |
|
intermediate |
author: |
|
Vince Negri |
|
as of Vim: |
|
5.7 |
If you really like the Computer Modern typewriter font (as seen in most TeX distributions) you can use it as the font in gvim! (looks excellent with font smoothing turned on)
First, get hold of the free Blue Sky Type 1 PS versions of the CM fonts from your local CTAN mirror. Unpack to a suitable directory.
Next locate the cmtt8.pfb file and open it (in Vim, naturally ;) - find the line
saying
dup 32 /visiblespace put
and change it to
dup 32 /space put
that is, inserting enough spaces to keep the file size exactly the same
(IMPORTANT!)
Save the file in Mac format (:set fileformat=mac).
Now install the cmtt.pfm file - in Win9x/NT4, you'll need Adobe Type Manager
(free download), but in Win2k, you can just drop the .pfm file into the Fonts folder.
Now in your _gvimrc:
set guifont=CMTT8:h11:cSYMBOL
(use whatever height you like instead of h11)
..and enjoy! It's the first scalable font I can bear to edit code in... %-)
<<Incredible new functionality |
Keystroke Saving Substituting and Searching >>
Additional Notes
|