IT How Tos

Home

About

Sitemap

Contact

Setting default fonts in GVIM

In order to set the correct font setting in GVIM

Implementation

  • First start by setting the font you want in an open GVIM session
    :set guifont=*
    • This will open a popup dialog so that the font can be set.
  • Then check the font
    :set guifont?
    • For example at the bottom of my current GVIM session I have
      guifont=Liberation Mono 16

Make permenant

  • Edit (using GVIM if preferred) this file:
    $HOME/.vimrc
    • Use this file to add the following lines
      if has("gui_running")
          set guifont=Liberation\ Mono\ 16
      endif
    • Please note that if your guifont contains spaces, then escape them with a backslash
  • Save the document as $HOME/.vimrc

Reference