Nice Ubuntu fonts + Vim Tip
Posted by: nico on
Sep 8th, 2009 |
Filed under: Gnome, Linux, Programming, Vim, Vim Tips
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:
-
sudo apt-get install ttf-inconsolata
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:
-
if has(‘gui_running’)
-
set guifont=Inconsolata\ Medium\ 14
-
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