Nicolás Brailovsky


A modern blog

Nice Ubuntu fonts + Vim Tip

author Posted by: nico on date Sep 8th, 2009 | filed Filed under: Gnome, Linux, Programming, Vim, Vim Tips
manuscrito It’s not unusual to hear someone complain about Ubuntu fonts. Apparently they are ugly. I guess that depends very much on a personal opinion, however not everyone knows there are alternative fonts in the common repositories (I think multiverse even has non-free fonts ported from Windows).

Someone recommended me Inconsolata as a nice programming font (it’s monospaced). I’m using it right now and it’s not bad. Let’s see how can you install it:

  1. sudo apt-get install ttf-inconsolata

incoshow

Easy and it looks even better when used with gVim. You can go to Edit > Select font to change the font preference, however this won’t set a new default for the next time you start gVim. To do this we need to add it to the .vimrc, and again, to do this we need to know the font’s name.

Type “:set guifont?” to see the font’s name. In my case it’s “Inconsolata Medium 14″ (I changed size and type). Now add the following to your .vimrc:

  1. if has(‘gui_running’)
  2.      set guifont=Inconsolata\ Medium\ 14
  3.  endif

Notice I added a backslash before the spaces, otherwise Vim will try to parse Medium and 14 as separated parameters to “Inconsolata”, which obviously won’t understand. Have fun with your new fonts.

     Add A Comment

trackback Trackback URI | rsscomment Comments RSS