I am working on RedHat RHEL5. I want to change the font in GVIM.

The only font format that my GVIM accepts is


It refuses to use Courier\ New or Courier_New names.

The default font is ugly and I wanted to change it to something prettier, like monospace font that I use in my terminal, but xfontsel does not show his font. set guifont=* neither works.

My questions are:

  1. How to "convince" GVIM to accept other system fonts

  2. Or, how to install additional fonts so they can be delivered to GVIM in -*-*-*- Morse code format


:set guifont=* gives error:

Font "*" is not fixed-width
Invalid font(s): guifont=*

To make the font selectable with xfontsel, additionally I had to use this trick:

xset fp+ ~/.fonts/  # maybe unnecessary
xset fp rehash

Take a look at this tutorial that shows how to install a custom font in your home directory, in a .fonts directory. The tutorial is titled: installing fonts in your home directory on Fedora 12.

Once a custom font has been installed here you can use the pull downs in gvim to change the font or run the command:

:set guifont=*

Which will bring up the dialog for selecting your font in gvim. See this tutorial on the Vim wiki for doing this as well and making them permanent.

I'd suggest the Proggy Fonts if you want something that looks good and fits nicely with doing development.

| improve this answer | |
  • Thanks, I installed the font but I cannot set it in GVIM (edited question) – Jakub M. Oct 15 '13 at 7:26
  • I had to to rehash and eventually it worked (described in my question) – Jakub M. Oct 15 '13 at 7:43

As an alternative you can use vim in a terminal and set whatever font your terminal offers. The advantage is that you can then run the editor in a terminal multiplexer (e.g. tmux or screen) and connect to your editing session remotely.

| improve this answer | |
  • well, I would not call it alternative, rather a default option :) It would be sufficient, but the terminal vim has ugly colour schemes (yes, I installed solarized etc, but my terminal refuses to run 256 colours for some reason) – Jakub M. Oct 15 '13 at 20:51
  • What terminal do you use? The problem can bite you in other places as well, so it might be wise to spend some time on that. – peterph Oct 15 '13 at 20:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.