Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gVim how to set guifont bold attribute

Tags:

vim

windows

fonts

I am using gvim 7.3 on Windows 7. I want to set the "Courier_New" font in bold style. How to do that? I tried the following but it failed.

if has("gui_running")
  if has("gui_gtk2")
    set guifont=Inconsolata\ 12
  elseif has("gui_macvim")
    set guifont=Menlo\ Regular:h14
  elseif has("gui_win32")
    set guifont=Courier_New\ Bold:h12:cANSI
  endif
endif
like image 608
Tem Pora Avatar asked Sep 15 '25 03:09

Tem Pora


1 Answers

An almost exactly identical example is available at the bottom of :help 'guifont':

:set guifont=courier_new:h12:w5:b:cRUSSIAN

so the following should do what you want:

:set guifont=courier_new:h12:b:cANSI

Always start with :help.

Additionaly, you can use :set guifont=* to open the font choosing dialog, select your font, and then use :set guifont? to see how the option was set.

like image 119
romainl Avatar answered Sep 17 '25 01:09

romainl