Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add to Available Fonts in gVim

Tags:

vim

While at work, I'm sadly forced to use Windows. I'm unhappy with (read: rageful toward) the font choices gVim offers, and I'd like to change it to the font I use on my dev computer at home.

However, gVim has limited options when it comes to what is available with the set guifont= option. Even though I know the font in question is great with VIM, as I use it elsewhere, I don't know how to add to the list of available fonts even though I have installed it on this machine, and I can't find this information anywhere.

Does anyone have any insight into this? I really don't understand why I can't set the guifont to be any monospace font I damn well please, instead of what gVim thinks is best.

like image 579
Thomas Thorogood Avatar asked Dec 02 '11 15:12

Thomas Thorogood


People also ask

How do I add fonts to gVim?

To set the default font used by GVim, add a command of the form set guifont= to your gvimrc . If you want to add it to vimrc file, then enclose this command in a if has("gui_running") block.

What font is used in Vim?

Console Vim uses whatever font the console/terminal is using. Changing the font in your terminal is done differently depending on your system and the terminal in use.


1 Answers

I've just downloaded, unpacked, installed DejaVu Sans Mono and it's added to the list.

I've done the same with your font and it's not added to the list.

It's probably a problem with the font itself.

From :help guifont I gather that, on Windows, Gvim only accepts monospaced fonts.

From the description your font seems to be monospaced but it's probably not 100% exact: I don't know if it's a glitch or what but the boxes on the pages don't seem to align very well.

I think that a monospaced font should make all the boxes aligned.

like image 105
romainl Avatar answered Oct 03 '22 07:10

romainl